Closed darasion closed 7 years ago
git rev-parse HEAD output is: f561c5e57575bb1e0a2167028b7339b3a8d16fb4
git rev-parse HEAD
f561c5e57575bb1e0a2167028b7339b3a8d16fb4
go version output is: go version go1.8 linux/amd64
go version
go version go1.8 linux/amd64
my test code is (test.go):
package main import ( "github.com/cihub/seelog" ) func main() { log, err := seelog.LoggerFromConfigAsString(`<seelog type="sync"> <outputs> <console formatid="fmt"/> </outputs> <formats> <format id="fmt" format="[%RelFile:%Line] [%Func] [%Lev] %Msg%n"/> </formats> </seelog>`) if err != nil { panic(err) } defer log.Flush() log.Debug("Test") // line 20 log.Info("Test2") // line 21 }
but go run test.go output is:
go run test.go
[test.go:21] [main.main] [Dbg] Test [test.go:22] [main.main] [Inf] Test2
I find the same, but this seems to be the line number returned by Go's standard library. Seelog is not introducing the off-by-one error. Perhaps this should be reported upstream?
git rev-parse HEAD
output is:f561c5e57575bb1e0a2167028b7339b3a8d16fb4
go version
output is:go version go1.8 linux/amd64
my test code is (test.go):
but
go run test.go
output is: