diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-01-12 23:14:27 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-01-12 23:14:27 +0000 |
commit | 20de9f6a415e3805ef9283fafada5fe42650b755 (patch) | |
tree | d7ffb3793dd3693ed7a04f410ee2cd31dc78aa80 | |
parent | ecd8635aecde4841daaa447cddcc395894859774 (diff) |
Always start by logging everything to syslog, even when running on the
console.
Don't closelog() here, let Logging do that for us. (refs #3)
-rw-r--r-- | bin/bbackupd/bbackupd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/bbackupd/bbackupd.cpp b/bin/bbackupd/bbackupd.cpp index 1ddbf397..0fe8ee41 100644 --- a/bin/bbackupd/bbackupd.cpp +++ b/bin/bbackupd/bbackupd.cpp @@ -29,7 +29,8 @@ int main(int argc, const char *argv[]) Logging::SetProgramName("Box Backup (bbackupd)"); Logging::ToConsole(true); - Logging::FilterSyslog (Log::EVERYTHING); + Logging::ToSyslog (true); + Logging::FilterSyslog(Log::EVERYTHING); #ifdef NDEBUG Logging::FilterConsole(Log::INFO); @@ -65,7 +66,6 @@ int main(int argc, const char *argv[]) if (argc >= 2 && ::strcmp(argv[1], "--service") == 0) { runAsWin32Service = true; - Logging::ToSyslog(true); } gpDaemonService = new Win32BackupService(); @@ -99,8 +99,6 @@ int main(int argc, const char *argv[]) BOX_FILE_BBACKUPD_DEFAULT_CONFIG, argc, argv); } - ::closelog(); - delete gpDaemonService; return ExitCode; |