Original post

Many languages allow you to print the line number of when and where something has happened. This is very useful for debugging a problem when it has occurred. By default in this is off, but you can turn it on when logging by setting flags.
package main import “log” func main() { // Enable line numbers in logging log.SetFlags(log.LstdFlags | log.Lshortfile) // Will print: “[date] [time] [filename]:[line]: [text]” log.