Many programming languages allow you to print the number of when and where something has happened. This is very useful for debugging a problem when it has occurred. By default in Go this is off, but you can turn it on by setting flags within the .
package main import "log" func main() { // Enable line in logging log.SetFlags(log.LstdFlags | log.Lshortfile) // Should say: "[date] [time] loglines.go:11: Example" log.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here