batmon/internal/logger/logger.go

25 lines
384 B
Go
Raw Normal View History

2024-01-11 19:51:07 +00:00
package logger
import (
"github.com/sirupsen/logrus"
)
var Log *logrus.Logger
func init() {
Log = logrus.New()
Log.SetFormatter(&logrus.JSONFormatter{})
}
func Info(format string, v ...interface{}) {
Log.Infof(format, v...)
}
func Error(format string, v ...interface{}) {
Log.Errorf(format, v...)
}
func Fatal(format string, v ...interface{}) {
Log.Fatalf(format, v...)
}