Use logrus for logging

This commit is contained in:
eikendev 2022-04-11 23:46:02 +02:00
parent c96baf40a5
commit f839f248b9
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
19 changed files with 192 additions and 87 deletions

22
internal/log/log.go Normal file
View file

@ -0,0 +1,22 @@
package log
import (
"os"
log "github.com/sirupsen/logrus"
)
var L *log.Logger
func init() {
L = log.New()
L.SetOutput(os.Stderr)
L.SetLevel(log.InfoLevel)
L.SetFormatter(&log.TextFormatter{
DisableTimestamp: true,
})
}
func SetDebug() {
L.SetLevel(log.DebugLevel)
}