You can set the Flags on either a custom Logger, or the default to include Llongfile
or Lshortfile
// to change the flags on the default logger
log.SetFlags(log.LstdFlags | log.Lshortfile)
You can set the Flags on either a custom Logger, or the default to include Llongfile
or Lshortfile
// to change the flags on the default logger
log.SetFlags(log.LstdFlags | log.Lshortfile)