summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/bbstored/BackupStoreDaemon.cpp2
-rw-r--r--debian/patches/03-adjust-syslog-facility.diff64
-rw-r--r--documentation/adminguide.xml6
-rw-r--r--lib/common/Logging.cpp8
-rw-r--r--lib/win32/emu.h3
5 files changed, 69 insertions, 14 deletions
diff --git a/bin/bbstored/BackupStoreDaemon.cpp b/bin/bbstored/BackupStoreDaemon.cpp
index 56e9375b..28e28176 100644
--- a/bin/bbstored/BackupStoreDaemon.cpp
+++ b/bin/bbstored/BackupStoreDaemon.cpp
@@ -201,7 +201,7 @@ void BackupStoreDaemon::Run()
SetProcessTitle("housekeeping, idle");
whichSocket = 1;
// Change the log name
- ::openlog("bbstored/hk", LOG_PID, LOG_DAEMON);
+ ::openlog("bbstored/hk", LOG_PID, LOG_LOCAL6);
// Log that housekeeping started
BOX_INFO("Housekeeping process started");
// Ignore term and hup
diff --git a/debian/patches/03-adjust-syslog-facility.diff b/debian/patches/03-adjust-syslog-facility.diff
new file mode 100644
index 00000000..311b8dcf
--- /dev/null
+++ b/debian/patches/03-adjust-syslog-facility.diff
@@ -0,0 +1,64 @@
+=== modified file 'bin/bbstored/BackupStoreDaemon.cpp'
+--- old/bin/bbstored/BackupStoreDaemon.cpp 2009-03-31 13:58:19 +0000
++++ new/bin/bbstored/BackupStoreDaemon.cpp 2009-03-31 13:58:21 +0000
+@@ -201,7 +201,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
+
+=== modified file 'lib/common/Logging.cpp'
+--- old/lib/common/Logging.cpp 2009-03-31 13:58:19 +0000
++++ new/lib/common/Logging.cpp 2009-03-31 13:58:22 +0000
+@@ -332,7 +336,7 @@ bool Syslog::Log(Log::Level level, const
+
+ Syslog::Syslog()
+ {
+- ::openlog("Box Backup", LOG_PID, LOG_LOCAL6);
++ ::openlog("Box Backup", LOG_PID, LOG_DAEMON);
+ }
+
+ Syslog::~Syslog()
+@@ -344,5 +348,5 @@ void Syslog::SetProgramName(const std::s
+ {
+ mName = rProgramName;
+ ::closelog();
+- ::openlog(mName.c_str(), LOG_PID, LOG_LOCAL6);
++ ::openlog(mName.c_str(), LOG_PID, LOG_DAEMON);
+ }
+
+=== modified file 'lib/win32/emu.h'
+--- old/lib/win32/emu.h 2009-03-31 13:58:19 +0000
++++ new/lib/win32/emu.h 2009-03-31 13:58:22 +0000
+@@ -253,8 +253,7 @@ HANDLE openfile(const char *filename, in
+ #define LOG_ERR 3
+ #define LOG_CRIT LOG_ERR
+ #define LOG_PID 0
+-#define LOG_LOCAL5 0
+-#define LOG_LOCAL6 0
++#define LOG_DAEMON 0
+
+ void openlog (const char * daemonName, int, int);
+ void closelog(void);
+
+=== modified file 'documentation/adminguide.xml'
+--- old/documentation/adminguide.xml 2008-02-02 07:31:52 +0000
++++ new/documentation/adminguide.xml 2009-03-30 21:10:14 +0000
+@@ -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>
+
+
diff --git a/documentation/adminguide.xml b/documentation/adminguide.xml
index 4a6180ad..d3552725 100644
--- a/documentation/adminguide.xml
+++ b/documentation/adminguide.xml
@@ -286,12 +286,6 @@ 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 87a25399..2b81b52b 100644
--- a/lib/common/Logging.cpp
+++ b/lib/common/Logging.cpp
@@ -11,10 +11,6 @@
#include <errno.h>
#include <time.h>
-#include <string.h> // for stderror
-
-// c.f. http://bugs.debian.org/512510
-#include <cstdio>
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
@@ -336,7 +332,7 @@ bool Syslog::Log(Log::Level level, const std::string& rFile,
Syslog::Syslog()
{
- ::openlog("Box Backup", LOG_PID, LOG_DAEMON);
+ ::openlog("Box Backup", LOG_PID, LOG_LOCAL6);
}
Syslog::~Syslog()
@@ -348,5 +344,5 @@ void Syslog::SetProgramName(const std::string& rProgramName)
{
mName = rProgramName;
::closelog();
- ::openlog(mName.c_str(), LOG_PID, LOG_DAEMON);
+ ::openlog(mName.c_str(), LOG_PID, LOG_LOCAL6);
}
diff --git a/lib/win32/emu.h b/lib/win32/emu.h
index ceed9657..8ab74130 100644
--- a/lib/win32/emu.h
+++ b/lib/win32/emu.h
@@ -253,7 +253,8 @@ HANDLE openfile(const char *filename, int flags, int mode);
#define LOG_ERR 3
#define LOG_CRIT LOG_ERR
#define LOG_PID 0
-#define LOG_DAEMON 0
+#define LOG_LOCAL5 0
+#define LOG_LOCAL6 0
void openlog (const char * daemonName, int, int);
void closelog(void);