Author: vferey
Date: Tue Jun 1 15:26:07 2010
New Revision: 8840
URL: http://svn.slimdevices.com/jive?rev=8840&view=rev
Log:
Use the right syslog priority levels.
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/src/log.h
Modified: 7.6/trunk/squeezeplay/src/squeezeplay/src/log.h
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/src/log.h?rev=8840&r1=8839&r2=8840&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/src/log.h (original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/src/log.h Tue Jun 1 15:26:07 2010
@@ -15,17 +15,36 @@
#ifdef _WIN32
#define __func__ __FUNCTION__
-#endif
+#endif
-/* Priority levels, that correspond to syslog */
+/*
+ The Severity code is the severity of the message that has been
generated
+*/
+
+#define SEVERITY_CODE_ERROR 3
+#define SEVERITY_CODE_WARN 4
+#define SEVERITY_CODE_INFO 6
+#define SEVERITY_CODE_DEBUG 7
+
+/*
+ The facility is the application or operating system component that
generates a log message.
+ All the syslog messages generated by squeezeplay are reported as
system daemon
+*/
+
+#define FACILITY_DAEMON 3
+
+
+/*
+ The Priority value is calculated by first multiplying the Facility
number by 8 and then adding the numerical value of the Severity
+*/
+
enum log_priority {
LOG_PRIORITY_OFF = 0,
- LOG_PRIORITY_ERROR = 300,
- LOG_PRIORITY_WARN = 400,
- LOG_PRIORITY_INFO = 600,
- LOG_PRIORITY_DEBUG = 700,
+ LOG_PRIORITY_ERROR = ( 8 * FACILITY_DAEMON + SEVERITY_CODE_ERROR )
,
+ LOG_PRIORITY_WARN = ( 8 * FACILITY_DAEMON + SEVERITY_CODE_WARN ),
+ LOG_PRIORITY_INFO = ( 8 * FACILITY_DAEMON + SEVERITY_CODE_INFO ),
+ LOG_PRIORITY_DEBUG = ( 8 * FACILITY_DAEMON + SEVERITY_CODE_DEBUG
),
};
-
struct log_category {
struct log_category *next;
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins