lib: Clean up logging

Since most of our logging goes through a single Logf command, we don't
need the file name information any more. Our hierarchial logging is
sufficient enough.

Eventually we will replace the top-level logger with a more visually
capable logging fixture.
This commit is contained in:
James Shubin
2019-04-11 18:52:54 -04:00
parent a5842a41b2
commit 859e4749ae

View File

@@ -29,11 +29,11 @@ import (
func hello(program, version string, flags Flags) { func hello(program, version string, flags Flags) {
var start = time.Now().UnixNano() var start = time.Now().UnixNano()
var logFlags int logFlags := log.LstdFlags
if flags.Debug || true { // TODO: remove || true if flags.Debug {
logFlags = log.LstdFlags | log.Lshortfile logFlags = logFlags + log.Lshortfile
} }
logFlags = (logFlags - log.Ldate) // remove the date for now logFlags = logFlags - log.Ldate // remove the date for now
log.SetFlags(logFlags) log.SetFlags(logFlags)
// un-hijack from capnslog... // un-hijack from capnslog...