diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-04-28 17:15:36 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-04-28 17:15:36 +0000 |
commit | 9362fdfa7b8f2639a2ec5290b38e2e9c9ea8483b (patch) | |
tree | 12c19910644a4b4a0503cd461963c82c625a2ea5 /lib/common/Logging.cpp | |
parent | d7f3062292dd3b859c6d2632945b6ef6f102a116 (diff) |
Keep a copy of the program name, in case the original goes away, which
causes syslog() to write nonsense for the program name. (refs #3)
Diffstat (limited to 'lib/common/Logging.cpp')
-rw-r--r-- | lib/common/Logging.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp index bb728183..5f0a2f8f 100644 --- a/lib/common/Logging.cpp +++ b/lib/common/Logging.cpp @@ -289,6 +289,7 @@ Syslog::~Syslog() void Syslog::SetProgramName(const std::string& rProgramName) { + mName = rProgramName; ::closelog(); - ::openlog(rProgramName.c_str(), LOG_PID, LOG_LOCAL6); + ::openlog(mName.c_str(), LOG_PID, LOG_LOCAL6); } |