github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/cli/logging.go (about) 1 package cli 2 3 import ( 4 "log" 5 "os" 6 "runtime" 7 8 "github.com/fatih/color" 9 "github.com/sirupsen/logrus" 10 ) 11 12 func InitLogging() { 13 log.SetFlags(log.Lshortfile | log.Ldate | log.Ltime) 14 15 logrus.SetFormatter(&logrus.TextFormatter{}) 16 logrus.SetOutput(os.Stdout) 17 logrus.SetLevel(logrus.DebugLevel) 18 19 if runtime.GOOS == "windows" { 20 color.NoColor = true 21 } 22 }