diff options
author | Bluesaxorcist <joshua@operatorfoundation.org> | 2019-10-21 17:32:39 -0500 |
---|---|---|
committer | Bluesaxorcist <joshua@operatorfoundation.org> | 2019-10-21 17:32:39 -0500 |
commit | 4a56b1440c2bc315adda61b542793b7780cb8730 (patch) | |
tree | 819118b10e18373d6ddca31665ba3b7970849652 /common/log | |
parent | 770bc14548a6a48ccbc8be0f0583122cf1dc6f6e (diff) |
Removed termmon and fixed compiler warnings
Diffstat (limited to 'common/log')
-rw-r--r-- | common/log/log.go | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/common/log/log.go b/common/log/log.go index 1c30b48..bcf83ea 100644 --- a/common/log/log.go +++ b/common/log/log.go @@ -59,7 +59,7 @@ var enableLogging bool var unsafeLogging bool // Init initializes logging with the given path, and log safety options. -func Init(enable bool, logFilePath string, unsafe bool) error { +func Init(enable bool, logFilePath string) error { if enable { f, err := os.OpenFile(logFilePath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600) if err != nil { @@ -78,12 +78,6 @@ func Enabled() bool { return enableLogging } -// Unsafe returns if unsafe logging is allowed (the caller MAY skip eliding -// addresses and other bits of sensitive information). -func Unsafe() bool { - return unsafeLogging -} - // Level returns the current log level. func Level() int { return logLevel @@ -140,14 +134,6 @@ func Infof(format string, a ...interface{}) { } } -// Debugf logs the given format string/arguments at the DEBUG log level. -func Debugf(format string, a ...interface{}) { - if enableLogging && logLevel >= LevelDebug { - msg := fmt.Sprintf(format, a...) - log.Print("[DEBUG]: " + msg) - } -} - // ElideError transforms the string representation of the provided error // based on the unsafeLogging setting. Callers that wish to log errors // returned from Go's net package should use ElideError to sanitize the |