您可以在自定义记录仪上设置标志,也可以在默认值上设置为包含
Llongfile或
Lshortfile
// to change the flags on the default loggerlog.SetFlags(log.LstdFlags | log.Lshortfile)

您可以在自定义记录仪上设置标志,也可以在默认值上设置为包含
Llongfile或
Lshortfile
// to change the flags on the default loggerlog.SetFlags(log.LstdFlags | log.Lshortfile)