mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-19 16:46:55 +00:00
feat(GODT-3155): customize log formatter for easier parsing.
This commit is contained in:
@ -91,9 +91,11 @@ func (cs *coloredStdOutHook) Fire(entry *logrus.Entry) error {
|
|||||||
// the default pruning algorithm.
|
// the default pruning algorithm.
|
||||||
func Init(logsPath string, sessionID SessionID, appName AppName, rotationSize, pruningSize int64, level string) (io.Closer, error) {
|
func Init(logsPath string, sessionID SessionID, appName AppName, rotationSize, pruningSize int64, level string) (io.Closer, error) {
|
||||||
logrus.SetFormatter(&logrus.TextFormatter{
|
logrus.SetFormatter(&logrus.TextFormatter{
|
||||||
DisableColors: true,
|
DisableColors: true,
|
||||||
FullTimestamp: true,
|
ForceQuote: true,
|
||||||
TimestampFormat: time.StampMilli,
|
FullTimestamp: true,
|
||||||
|
QuoteEmptyFields: true,
|
||||||
|
TimestampFormat: "2006-01-02 15:04:05.000",
|
||||||
})
|
})
|
||||||
|
|
||||||
logrus.AddHook(newColoredStdOutHook())
|
logrus.AddHook(newColoredStdOutHook())
|
||||||
|
|||||||
Reference in New Issue
Block a user