Commit 94955644 authored by 's avatar

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
parent 5bf76bb4
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment