You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
329 B

  1. package main
  2. import (
  3. "github.com/Sirupsen/logrus"
  4. "github.com/mattn/go-colorable"
  5. )
  6. func main() {
  7. logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
  8. logrus.SetOutput(colorable.NewColorableStdout())
  9. logrus.Info("succeeded")
  10. logrus.Warn("not correct")
  11. logrus.Error("something error")
  12. logrus.Fatal("panic")
  13. }