From 688d118c7e0d439691e84fc6e068ab3e19da5185 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 7 Apr 2015 14:57:04 +0200 Subject: Updated logging --- logger/glog/glog.go | 4 ++++ logger/glog/glog_file.go | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'logger') diff --git a/logger/glog/glog.go b/logger/glog/glog.go index a0c4727f8..008c0e036 100644 --- a/logger/glog/glog.go +++ b/logger/glog/glog.go @@ -128,6 +128,10 @@ func GetTraceLocation() *TraceLocation { return &logging.traceLocation } +func GetVModule() *moduleSpec { + return &logging.vmodule +} + // get returns the value of the severity. func (s *severity) get() severity { return severity(atomic.LoadInt32((*int32)(s))) diff --git a/logger/glog/glog_file.go b/logger/glog/glog_file.go index 847e9b07c..2fc96eb4e 100644 --- a/logger/glog/glog_file.go +++ b/logger/glog/glog_file.go @@ -40,6 +40,10 @@ var logDirs []string //var logDir = flag.String("log_dir", "", "If non-empty, write log files in this directory") var logDir *string = new(string) +func SetLogDir(str string) { + *logDir = str +} + func createLogDirs() { if *logDir != "" { logDirs = append(logDirs, *logDir) -- cgit v1.2.3