Print correct line numbers in auxiliary logger methods
Created by: VoidingWarranties
I noticed that lines logged with our auxiliary logger methods (log.Debug
, log.Critical
, etc...) all had "log.go" as the file in the output. Not very useful. Now they print the name of the file one up the call stack.
before:
2016/05/06 22:22:47.512103 log.go:66: STARTUP: Logging has started.
2016/05/06 22:22:47.514772 gateway.go:154: INFO: gateway created, started logging
2016/05/06 22:22:47.514772 log.go:32: INFO: example line logged with log.Debug
2016/05/06 22:22:47.872444 log.go:55: SHUTDOWN: Logging has terminated.
after:
2016/05/06 22:22:47.512103 gateway.go:114: STARTUP: Logging has started.
2016/05/06 22:22:47.514772 gateway.go:154: INFO: gateway created, started logging
2016/05/06 22:22:47.514772 gateway_test.go:100: INFO: example line logged with log.Debug
2016/05/06 22:22:47.872444 gateway.go:88: SHUTDOWN: Logging has terminated.