static const int kNetworkBytes = 1400;
static const string& hostname();
- private:
+ static void DeleteLogDestinations();
+
+ private:
LogDestination(LogSeverity severity, const char* base_filename);
~LogDestination() { }
return log_destinations_[severity];
}
+void LogDestination::DeleteLogDestinations() {
+ for (int severity = 0; severity < NUM_SEVERITIES; ++severity) {
+ delete log_destinations_[severity];
+ log_destinations_[severity] = NULL;
+ }
+}
+
namespace {
LogFileObject::LogFileObject(LogSeverity severity,
LogMessage::Fail();
}
+void InitGoogleLogging(const char* argv0) {
+ glog_internal_namespace_::InitGoogleLoggingUtilities(argv0);
+}
+
+void ShutdownGoogleLogging() {
+ glog_internal_namespace_::ShutdownGoogleLoggingUtilities();
+ LogDestination::DeleteLogDestinations();
+ delete logging_directories_list;
+ logging_directories_list = NULL;
+}
+
_END_GOOGLE_NAMESPACE_
r);
}
-} // namespace glog_internal_namespace_
-
-void InitGoogleLogging(const char* argv0) {
+void InitGoogleLoggingUtilities(const char* argv0) {
CHECK(!IsGoogleLoggingInitialized())
<< "You called InitGoogleLogging() twice!";
const char* slash = strrchr(argv0, '/');
#endif
}
-void ShutdownGoogleLogging() {
+void ShutdownGoogleLoggingUtilities() {
CHECK(IsGoogleLoggingInitialized())
<< "You called ShutdownGoogleLogging() without calling InitGoogleLogging() first!";
#ifdef HAVE_SYSLOG_H
#endif
}
+} // namespace glog_internal_namespace_
+
_END_GOOGLE_NAMESPACE_
// Make an implementation of stacktrace compiled.
void SetCrashReason(const CrashReason* r);
+void InitGoogleLoggingUtilities(const char* argv0);
+void ShutdownGoogleLoggingUtilities();
+
} // namespace glog_internal_namespace_
_END_GOOGLE_NAMESPACE_