[AGENT++] user-defined log class for snmp++?
Jochen Katz
katz at agentpp.com
Thu Feb 8 00:13:11 CET 2007
Hi,
> DefaultLog::log()->set_filter(USER_LOG, 15);
> // i am only concerned with the application log entry.
ok, the changes below should allow this. It will be added to the next
release.
Regards,
Jochen
log.h:
@@ -107,8 +107,9 @@
#define EVENT_LOG 0x30
#define INFO_LOG 0x40
#define DEBUG_LOG 0x50
+#define USER_LOG 0x60
-#define LOG_TYPES 5
+#define LOG_TYPES 6
#ifdef _NO_LOGGING
log.cpp:
@@ -112,7 +112,7 @@
// default log filter: logs with level less or equal filter value are
logged
// error, warning, event, info, debug:
-static unsigned char default_logfilter[] = { 9, 9, 4, 6, 7 };
+static unsigned char default_logfilter[] = { 9, 9, 4, 6, 7, 15};
#undef LOG_INDENT
@@ -148,6 +148,7 @@
case WARNING_LOG: add_string("WARNING: "); break;
case ERROR_LOG: add_string("ERROR : "); break;
case EVENT_LOG: add_string("EVENT : "); break;
+ case USER_LOG: add_string("USER : "); break;
}
#ifdef LOG_INDENT
More information about the AGENTPP
mailing list