summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian QA Group <packages@qa.debian.org>2017-01-21 21:29:52 -0500
committerAndreas Beckmann <anbe@debian.org>2017-01-21 21:29:52 -0500
commitb19da4f742f1814bd289ae1516a898d3bc5e4187 (patch)
tree8fbb9d5ff01dda430c2e16848f735a0b953ea8f0
parent1c85f92db7844f9e651a62827ba753afa742c28c (diff)
adjust-syslog-facility
change default syslog facility from LOG_LOCAL6 to LOG_DAEMON Gbp-Pq: Name 03-adjust-syslog-facility.diff
-rw-r--r--bin/bbstored/BackupStoreDaemon.cpp2
-rw-r--r--docs/docbook/adminguide.xml6
-rw-r--r--lib/common/Logging.cpp6
3 files changed, 10 insertions, 4 deletions
diff --git a/bin/bbstored/BackupStoreDaemon.cpp b/bin/bbstored/BackupStoreDaemon.cpp
index 4de0a078..6e4fa79d 100644
--- a/bin/bbstored/BackupStoreDaemon.cpp
+++ b/bin/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
diff --git a/docs/docbook/adminguide.xml b/docs/docbook/adminguide.xml
index edb0a58c..440c7d4f 100644
--- a/docs/docbook/adminguide.xml
+++ b/docs/docbook/adminguide.xml
@@ -286,6 +286,12 @@ local5.info /var/log/raidfile</programlisting>
<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>
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp
index 296443ea..a54ef244 100644
--- a/lib/common/Logging.cpp
+++ b/lib/common/Logging.cpp
@@ -401,7 +401,7 @@ bool Syslog::Log(Log::Level level, const std::string& rFile,
return true;
}
-Syslog::Syslog() : mFacility(LOG_LOCAL6)
+Syslog::Syslog() : mFacility(LOG_DAEMON)
{
::openlog("Box Backup", LOG_PID, mFacility);
}
@@ -439,8 +439,8 @@ int Syslog::GetNamedFacility(const std::string& rFacility)
#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& rFile,