From 20de9f6a415e3805ef9283fafada5fe42650b755 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 12 Jan 2007 23:14:27 +0000 Subject: 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) --- bin/bbackupd/bbackupd.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin/bbackupd/bbackupd.cpp') 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; -- cgit v1.2.3