aboutsummaryrefslogtreecommitdiff
path: root/internal/tlog/log_go1.5.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-27 09:12:03 +0200
committerJakob Unterwurzacher2016-06-27 09:12:03 +0200
commitc400aca5cf7b57f5e1e7a604cfeea2512643349f (patch)
tree7f195ec09fcebc73b378153a15fa96272e87a16d /internal/tlog/log_go1.5.go
parent3288d987032fde33ff3cd837b1a0feb612b9710b (diff)
tlog: clean up messages from the go-fuse library
Drop the date and add the "go-fuse: " prefix so you can see where the message is coming from. Before: Jun 27 09:03:15 brikett gocryptfs[4150]: 2016/06/27 09:03:15 Unimplemented opcode INTERRUPT After: Jun 27 09:10:58 brikett gocryptfs[4961]: go-fuse: Unimplemented opcode INTERRUPT
Diffstat (limited to 'internal/tlog/log_go1.5.go')
-rw-r--r--internal/tlog/log_go1.5.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/tlog/log_go1.5.go b/internal/tlog/log_go1.5.go
index 40ec656..9c152d9 100644
--- a/internal/tlog/log_go1.5.go
+++ b/internal/tlog/log_go1.5.go
@@ -24,6 +24,9 @@ func SwitchLoggerToSyslog(p syslog.Priority) {
if err != nil {
Warn.Printf("SwitchLoggerToSyslog: %v", err)
} else {
+ log.SetPrefix("go-fuse: ")
+ // Disable printing the timestamp, syslog already provides that
+ log.SetFlags(0)
log.SetOutput(w)
}
}