mirror of
https://github.com/NotAShelf/batmon.git
synced 2024-11-26 07:06:46 +00:00
25 lines
384 B
Go
25 lines
384 B
Go
|
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...)
|
||
|
}
|