aboutsummaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/src/lib/win32/syslog.cpp
diff options
context:
space:
mode:
authorNingSun <ning.sun@intel.com>2018-03-14 16:35:31 -0700
committerNingSun <ning.sun@intel.com>2018-03-14 17:02:47 -0700
commitda00ff6db5e68773996ec79d711c45fb3444c580 (patch)
tree0387aa1f70a468e6c3264767454ae6f4528f59e8 /SoftHSMv2/src/lib/win32/syslog.cpp
parent535535b7c5f2781fa096a5fd00a762d24db4eddc (diff)
Remove win32 support in SoftHSMv2
Due to license issue, we have to remove win32 support in SoftHSMv2. Issue-ID: AAF-151 Change-Id: I31dda45ed84065819e26be8205747dd096a37432 Signed-off-by: NingSun <ning.sun@intel.com>
Diffstat (limited to 'SoftHSMv2/src/lib/win32/syslog.cpp')
-rw-r--r--SoftHSMv2/src/lib/win32/syslog.cpp69
1 files changed, 0 insertions, 69 deletions
diff --git a/SoftHSMv2/src/lib/win32/syslog.cpp b/SoftHSMv2/src/lib/win32/syslog.cpp
deleted file mode 100644
index 927592e..0000000
--- a/SoftHSMv2/src/lib/win32/syslog.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <config.h>
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
-
-#ifdef _WIN32
-
-static HANDLE hEventLog = NULL;
-
-/*
- * Close the Handle to the application Event Log
- */
-void
-closelog() {
- DeregisterEventSource(hEventLog);
-}
-
-/*
- * Initialize event logging
- */
-void
-openlog(const char *ident, int logopt, int facility) {
- /* Get a handle to the Application event log */
- hEventLog = RegisterEventSourceA(NULL, ident);
-}
-
-/*
- * Log to the NT Event Log
- */
-void
-syslog(int priority, const char *message, ...) {
- va_list ap;
- char buf[1024];
- LPCSTR str[1];
-
- str[0] = buf;
-
- va_start(ap, message);
- vsprintf(buf, message, ap);
- va_end(ap);
-
- /* Make sure that the channel is open to write the event */
- if (hEventLog == NULL) {
- openlog("SoftHSM", 0, 0);
- }
- if (hEventLog != NULL) {
- switch (priority) {
- case LOG_INFO:
- case LOG_NOTICE:
- case LOG_DEBUG:
- ReportEventA(hEventLog, EVENTLOG_INFORMATION_TYPE, 0,
- 0x40000003, NULL, 1, 0, str, NULL);
- break;
- case LOG_WARNING:
- ReportEventA(hEventLog, EVENTLOG_WARNING_TYPE, 0,
- 0x80000002, NULL, 1, 0, str, NULL);
- break;
- default:
- ReportEventA(hEventLog, EVENTLOG_ERROR_TYPE, 0,
- 0xc0000001, NULL, 1, 0, str, NULL);
- break;
- }
- }
-}
-
-#endif