From 94955644234ffde50ddaeedd07791fc8df5eba0a Mon Sep 17 00:00:00 2001 From: Date: Thu, 30 Jul 2009 10:43:50 +0000 Subject: [PATCH] Call glog_internal_namespace_::ProgramInvocationShortName() explicitly. Otherwise, we may call google::ProgramInvocationShortName() in gflags. git-svn-id: https://google-glog.googlecode.com/svn/trunk@68 eb4d4688-79bd-11dd-afb4-1d65580434c0 --- src/logging.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/logging.cc b/src/logging.cc index 6db9cfa..8c64274 100644 --- a/src/logging.cc +++ b/src/logging.cc @@ -530,7 +530,7 @@ inline void LogDestination::MaybeLogToEmail(LogSeverity severity, to += addresses_; } const string subject(string("[LOG] ") + LogSeverityNames[severity] + ": " + - ProgramInvocationShortName()); + glog_internal_namespace_::ProgramInvocationShortName()); string body(hostname()); body += "\n\n"; body.append(message, len); @@ -613,7 +613,7 @@ LogFileObject::LogFileObject(LogSeverity severity, const char* base_filename) : base_filename_selected_(base_filename != NULL), base_filename_((base_filename != NULL) ? base_filename : ""), - symlink_basename_(ProgramInvocationShortName()), + symlink_basename_(glog_internal_namespace_::ProgramInvocationShortName()), filename_extension_(), file_(NULL), severity_(severity), @@ -796,7 +796,8 @@ void LogFileObject::Write(bool force_flush, // // Where does the file get put? Successively try the directories // "/tmp", and "." - string stripped_filename(ProgramInvocationShortName()); // in cmdlineflag + string stripped_filename( + glog_internal_namespace_::ProgramInvocationShortName()); string hostname; GetHostName(&hostname); @@ -1306,7 +1307,8 @@ void LogMessage::SendToSyslogAndLog() { // Before any calls to syslog(), make a single call to openlog() static bool openlog_already_called = false; if (!openlog_already_called) { - openlog(ProgramInvocationShortName(), LOG_CONS | LOG_NDELAY | LOG_PID, + openlog(glog_internal_namespace_::ProgramInvocationShortName(), + LOG_CONS | LOG_NDELAY | LOG_PID, LOG_USER); openlog_already_called = true; } -- 2.7.4