Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- package main
-
- import (
- "github.com/Sirupsen/logrus"
- "github.com/mattn/go-colorable"
- )
-
- func main() {
- logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
- logrus.SetOutput(colorable.NewColorableStdout())
-
- logrus.Info("succeeded")
- logrus.Warn("not correct")
- logrus.Error("something error")
- logrus.Fatal("panic")
- }
|