mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
29 lines
427 B
Go
29 lines
427 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type CustomFormatter struct {
|
|
logrus.TextFormatter
|
|
}
|
|
|
|
var Log *logrus.Logger
|
|
|
|
func init() {
|
|
Log = logrus.New()
|
|
|
|
// Set logger to use the custom text formatter
|
|
Log.SetFormatter(&CustomFormatter{
|
|
TextFormatter: logrus.TextFormatter{
|
|
TimestampFormat: "15:04:05.000",
|
|
FullTimestamp: true,
|
|
ForceColors: true,
|
|
},
|
|
})
|
|
|
|
Log.SetOutput(os.Stdout)
|
|
}
|