Is there any way to redirect output from panic to a file with a timestamp for each panic.
Current example result of the panic log file:
goroutine 6 [running]:
_/C_/....func·001(0x11691e80, 0x1a, 0x0, 0x0, 0x10d3550, 0x11691ec0, 0x0, 0x0)
C:/.../Logger.go:309 +0x47
path/filepath.Walk(0x11691e80, 0x1a, 0x1161defc, 0x0, 0x0)
c:/...../path.go:392 +0x97
_/C_/...../Logger.Sample(0x1168ac00, 0x59, 0x0, 0x0)
C:/...../Logger.go:322 +0x1c5
main.handleFileActions()
C:/...../main.go:453 +0x2ad
created by main.main
C:/..../main.go:278 +0x6ea
Expected result:
2017-02-27T14:24:22.627Z - goroutine 6 [running]:
_/C_/....func·001(0x11691e80, 0x1a, 0x0, 0x0, 0x10d3550, 0x11691ec0, 0x0, 0x0)
C:/.../Logger.go:309 +0x47
path/filepath.Walk(0x11691e80, 0x1a, 0x1161defc, 0x0, 0x0)
c:/...../path.go:392 +0x97
_/C_/...../Logger.Sample(0x1168ac00, 0x59, 0x0, 0x0)
C:/...../Logger.go:322 +0x1c5
main.handleFileActions()
C:/...../main.go:453 +0x2ad
created by main.main
C:/..../main.go:278 +0x6ea