[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r5319 - trunk/softHSM/src/lib

Rickard Bellgrim rickard at opendnssec.org
Tue Jul 12 11:37:24 CEST 2011


Author: rb
Date: 2011-07-12 11:37:24 +0200 (Tue, 12 Jul 2011)
New Revision: 5319

Modified:
   trunk/softHSM/src/lib/log.cpp
Log:
Register the events as SoftHSM


Modified: trunk/softHSM/src/lib/log.cpp
===================================================================
--- trunk/softHSM/src/lib/log.cpp	2011-07-12 09:16:42 UTC (rev 5318)
+++ trunk/softHSM/src/lib/log.cpp	2011-07-12 09:37:24 UTC (rev 5319)
@@ -46,11 +46,11 @@
 #ifndef WIN32
   syslog(LOG_ERR, "SoftHSM: %s: %s", functionName, text);
 #else
-  HANDLE hEventLog = OpenEventLog(NULL, "Application");
+  HANDLE hEventLog = OpenEventLog(NULL, "SoftHSM");
   if(hEventLog) {
     char msg[1024];
     char* msgs[1];
-    snprintf(msg, sizeof(msg), "SoftHSM: %s: %s", functionName, text);
+    snprintf(msg, sizeof(msg), "%s: %s", functionName, text);
     msgs[0] = msg;
     ReportEvent(hEventLog, EVENTLOG_ERROR_TYPE, 0, 0, NULL, 1, 0, (const char **)msgs, NULL);
     CloseEventLog(hEventLog);
@@ -62,11 +62,11 @@
 #ifndef WIN32
   syslog(LOG_WARNING, "SoftHSM: %s: %s", functionName, text);
 #else
-  HANDLE hEventLog = OpenEventLog(NULL, "Application");
+  HANDLE hEventLog = OpenEventLog(NULL, "SoftHSM");
   if(hEventLog) {
     char msg[1024];
     char* msgs[1];
-    snprintf(msg, sizeof(msg), "SoftHSM: %s: %s", functionName, text);
+    snprintf(msg, sizeof(msg), "%s: %s", functionName, text);
     msgs[0] = msg;
     ReportEvent(hEventLog, EVENTLOG_WARNING_TYPE, 0, 0, NULL, 1, 0, (const char **)msgs, NULL);
     CloseEventLog(hEventLog);
@@ -78,11 +78,11 @@
 #ifndef WIN32
   syslog(LOG_INFO, "SoftHSM: %s: %s", functionName, text);
 #else
-  HANDLE hEventLog = OpenEventLog(NULL, "Application");
+  HANDLE hEventLog = OpenEventLog(NULL, "SoftHSM");
   if(hEventLog) {
     char msg[1024];
     char* msgs[1];
-    snprintf(msg, sizeof(msg), "SoftHSM: %s: %s", functionName, text);
+    snprintf(msg, sizeof(msg), "%s: %s", functionName, text);
     msgs[0] = msg;
     ReportEvent(hEventLog, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)msgs, NULL);
     CloseEventLog(hEventLog);




More information about the Opendnssec-commits mailing list