package global import ( "os" "github.com/mattn/go-colorable" log "github.com/sirupsen/logrus" ) func Init() { if os.Getenv("CONFIG_ENV") != "prod" { log.SetFormatter(&LogFile{ TextFormatter: log.TextFormatter{ ForceColors: true, }, }) log.SetOutput(colorable.NewColorableStdout()) } }