diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-09-14 00:26:13 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-09-14 00:26:13 +0000 |
commit | e5717c428009d7702ce5d8bf65217f759f114294 (patch) | |
tree | 142ac1a7068bf73166560f7921ec3b6213b5a079 /bin | |
parent | b6dd422728b2adab1d4d2c7a5d477aecc9c37cfa (diff) |
Prefix event log application name with Box Backup, and remove it from
all calls to SetProgramName, for better consistency on Unix.
Make bbstoreaccounts and bbackupctl set their program names for logging.
Don't override supplied tag with service name when BackupDaemon
is run as a service.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/bbackupctl/bbackupctl.cpp | 4 | ||||
-rw-r--r-- | bin/bbackupd/BackupDaemon.cpp | 3 | ||||
-rw-r--r-- | bin/bbackupquery/bbackupquery.cpp | 2 | ||||
-rw-r--r-- | bin/bbstoreaccounts/bbstoreaccounts.cpp | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/bin/bbackupctl/bbackupctl.cpp b/bin/bbackupctl/bbackupctl.cpp index 52f7c2ed..27c79926 100644 --- a/bin/bbackupctl/bbackupctl.cpp +++ b/bin/bbackupctl/bbackupctl.cpp @@ -62,9 +62,7 @@ int main(int argc, const char *argv[]) MAINHELPER_START -#if defined WIN32 && ! defined NDEBUG - ::openlog("Box Backup (bbackupctl)", 0, 0); -#endif + Logging::SetProgramName("bbackupctl"); // Filename for configuration file? std::string configFilename; diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp index a17870ed..12e5fcd2 100644 --- a/bin/bbackupd/BackupDaemon.cpp +++ b/bin/bbackupd/BackupDaemon.cpp @@ -335,6 +335,7 @@ int BackupDaemon::ProcessOption(signed int option) case 'S': { mServiceName = optarg; + Logging::SetProgramName(mServiceName); return 0; } @@ -369,8 +370,6 @@ int BackupDaemon::Main(const std::string &rConfigFileName) return RemoveService(mServiceName); } - Logging::SetProgramName("Box Backup (" + mServiceName + ")"); - int returnCode; if (mRunAsService) diff --git a/bin/bbackupquery/bbackupquery.cpp b/bin/bbackupquery/bbackupquery.cpp index bba3f89f..26d4ae50 100644 --- a/bin/bbackupquery/bbackupquery.cpp +++ b/bin/bbackupquery/bbackupquery.cpp @@ -109,7 +109,7 @@ int main(int argc, const char *argv[]) // Flags bool readWrite = false; - Logging::SetProgramName("Box Backup (bbackupquery)"); + Logging::SetProgramName("bbackupquery"); #ifdef NDEBUG int masterLevel = Log::NOTICE; // need an int to do math with diff --git a/bin/bbstoreaccounts/bbstoreaccounts.cpp b/bin/bbstoreaccounts/bbstoreaccounts.cpp index 2546026f..e1700278 100644 --- a/bin/bbstoreaccounts/bbstoreaccounts.cpp +++ b/bin/bbstoreaccounts/bbstoreaccounts.cpp @@ -459,6 +459,8 @@ int main(int argc, const char *argv[]) MAINHELPER_START + Logging::SetProgramName("bbstoreaccounts"); + // Filename for configuration file? std::string configFilename; |