package common import ( "log" ) var logger *log.Logger func GetLog(prefix string) *log.Logger { initLog(prefix) return logger } func initLog(prefix string) { logger = log.Default() logger.SetFlags(log.Llongfile | log.Ltime | log.Ldate) logger.SetPrefix(prefix) }