mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 15:25:43 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user