[Box Backup-commit] COMMIT r1236 - box/chris/merge/bin/bbackupd

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Fri Jan 12 23:14:27 GMT 2007


Author: chris
Date: 2007-01-12 23:14:27 +0000 (Fri, 12 Jan 2007)
New Revision: 1236

Modified:
   box/chris/merge/bin/bbackupd/bbackupd.cpp
Log:
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)


Modified: box/chris/merge/bin/bbackupd/bbackupd.cpp
===================================================================
--- box/chris/merge/bin/bbackupd/bbackupd.cpp	2007-01-11 23:01:30 UTC (rev 1235)
+++ box/chris/merge/bin/bbackupd/bbackupd.cpp	2007-01-12 23:14:27 UTC (rev 1236)
@@ -29,7 +29,8 @@
 
 	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 @@
 	if (argc >= 2 && ::strcmp(argv[1], "--service") == 0)
 	{
 		runAsWin32Service = true;
-		Logging::ToSyslog(true);
 	}
 
 	gpDaemonService = new Win32BackupService();
@@ -99,8 +99,6 @@
 			BOX_FILE_BBACKUPD_DEFAULT_CONFIG, argc, argv);
 	}
 
-	::closelog();
-
 	delete gpDaemonService;
 
 	return ExitCode;




More information about the Boxbackup-commit mailing list