mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
20 lines
426 B
Go
20 lines
426 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
|
||
|
"github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
func configureLogger() {
|
||
|
logger := logrus.New() // logger is to implicitly substitute stdlib's log
|
||
|
log.SetOutput(logger.Writer())
|
||
|
|
||
|
formatter := &logrus.TextFormatter{DisableTimestamp: true, DisableLevelTruncation: true}
|
||
|
logger.SetFormatter(formatter)
|
||
|
logrus.SetFormatter(formatter)
|
||
|
|
||
|
logger.SetLevel(logrus.DebugLevel)
|
||
|
logrus.SetLevel(logrus.DebugLevel)
|
||
|
}
|