diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-27 09:08:50 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-27 09:08:50 +0100 |
commit | 06baadef15c8326bc5d5a2d300cdd44a9aea29d4 (patch) | |
tree | 48897440d0fbe326b854ce584765e21288d279a9 | |
parent | 8f9c232c3ba5bf17fc0790d80e96844fff5a9ca1 (diff) | |
download | wolfbones-06baadef15c8326bc5d5a2d300cdd44a9aea29d4.tar.gz wolfbones-06baadef15c8326bc5d5a2d300cdd44a9aea29d4.tar.bz2 |
fixed around the logger in the service, updated todo list of the logger
-rw-r--r-- | docs/log/TODOS | 9 | ||||
-rw-r--r-- | src/service/service.c | 9 |
2 files changed, 7 insertions, 11 deletions
diff --git a/docs/log/TODOS b/docs/log/TODOS index 3f410b7..f7050f8 100644 --- a/docs/log/TODOS +++ b/docs/log/TODOS @@ -1,13 +1,8 @@ -- remove strerror and strerror_r calls in daemon code, replace with - wolf_log_strerror; also clean up gettext po files with strerror string - in message string (which is wrong) -- fix new_formatstr, we can't append the FormatStr or strerror_r buffer - there! Otherwise GetLastError and the message won't show up in the - event log! Maybe have a format string with a %s (%d) placeholder in the - end? - rewrite and clean up, make logging channels, make logging re-entrant (error in one channel should be logged on all other available channels) - local localized error handling (GetLastError and strerror_r strings) +- Windows console logger: + - why is it always English? what settings influence the language choosen? - Windows event logger - audit event log types, especially the effects on syslog and the upper abstraction layer diff --git a/src/service/service.c b/src/service/service.c index 5a44114..53abda7 100644 --- a/src/service/service.c +++ b/src/service/service.c @@ -262,11 +262,12 @@ void WINAPI wolf_service_main( DWORD argc, LPTSTR *argv ) { char errbuf[512]; BOOL res; - /* all other loggers make no sense: a service is not supposed - * to have a logfile or interaction with the user in any way! + /* close all loggers but the logging to the event log. If the service runs + * with interactive right, it could open a console on the desktop (maybe this + * is something for debugging later?). */ - wolf_log_openlogtoeventlog( NULL, "Application", "testservice", - "C:\\Temp\\testservicemsg.dll", WOLF_LAST_INTERNAL_CATEGORY+1, WOLF_LOG_DEBUG ); + wolf_log_closelogtofile( ); + wolf_log_closelogtostderr( ); /* register the event callback where we get called by the service * manager and the system |