summaryrefslogtreecommitdiff
path: root/debian/patches/03-adjust-syslog-facility.diff
blob: 4856026d7373810e62da11e6909af76599ca87fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
change default syslog facility from LOG_LOCAL6 to LOG_DAEMON

--- a/lib/common/Logging.cpp
+++ b/lib/common/Logging.cpp
@@ -411,7 +411,7 @@ bool Syslog::Log(Log::Level level, const
 	return true;
 }
 
-Syslog::Syslog() : mFacility(LOG_LOCAL6)
+Syslog::Syslog() : mFacility(LOG_DAEMON)
 {
 	::openlog("Box Backup", LOG_PID, mFacility);
 }
@@ -454,8 +454,8 @@ int Syslog::GetNamedFacility(const std::
 	#undef CASE_RETURN
 
 	BOX_ERROR("Unknown log facility '" << rFacility << "', "
-		"using default LOCAL6");
-	return LOG_LOCAL6;
+		"using default DAEMON");
+	return LOG_DAEMON;
 }
 
 bool FileLogger::Log(Log::Level Level, const std::string& file, int line,
--- a/docs/docbook/adminguide.xml
+++ b/docs/docbook/adminguide.xml
@@ -286,6 +286,12 @@ local5.info                         /var
         <para><emphasis role="bold">Note:</emphasis> Separators must be tabs,
         otherwise these entries will be ignored.</para>
 
+        <para><emphasis role="bold">Note2:</emphasis> The packaged
+        debian and ubuntu versions of boxbackup do not log to local6,
+        but to the more standard 'daemon' facility. This means you
+        should not have anything to do to your syslog configuration,
+        since it is configured to be logged by default.</para>
+
         <programlisting>touch /var/log/box
 touch /var/log/raidfile</programlisting>
 
--- a/lib/bbstored/BackupStoreDaemon.cpp
+++ b/lib/bbstored/BackupStoreDaemon.cpp
@@ -203,7 +203,7 @@ void BackupStoreDaemon::Run()
 				SetProcessTitle("housekeeping, idle");
 				whichSocket = 1;
 				// Change the log name
-				::openlog("bbstored/hk", LOG_PID, LOG_LOCAL6);
+				::openlog("bbstored/hk", LOG_PID, LOG_DAEMON);
 				// Log that housekeeping started
 				BOX_INFO("Housekeeping process started");
 				// Ignore term and hup