Closed alexandrestein closed 6 years ago
Can you show me the output of panic/fatal?
As now:
{"time":"2018-03-16T09:33:06.071499779+01:00","level":"-","prefix":"test","file":"log.go","line":"190","message":"fatal"}
{"time":"2018-03-16T09:33:06.075327295+01:00","level":"-","prefix":"test","file":"log.go","line":"195","message":"fatal-f"}
After the update:
{"time":"2018-03-16T09:29:51.372949036+01:00","level":"FATAL","prefix":"test","file":"log_test.go","line":"68","message":"fatal"}
{"time":"2018-03-16T09:29:51.376687921+01:00","level":"FATAL","prefix":"test","file":"log_test.go","line":"71","message":"fatal-f"}
This display the level.
But the most import thing is that keeps the initiator file and line and not the line inside the log
package.
Sorry, I should have told you this in first step.
@alexandreStein thanks for your contribution 🎉
It's a very small and quite dirty change. I did not take the time to understand all the internal logic of this package.
But I think it could be nice to keep the same nice display when you hit Panic or Fatal.
Tell me what you think.