From 07c10d88b9aefc72e364f6128d329ac6968ce7b0 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Tue, 9 May 2023 07:47:54 +0200 Subject: [PATCH] Initialize log handlers also without init --- pkg/log/log.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/log/log.go b/pkg/log/log.go index 5fa7cd3..97aecf6 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -34,11 +34,11 @@ var ( ) var ( - DebugLog *log.Logger - InfoLog *log.Logger - WarnLog *log.Logger - ErrLog *log.Logger - CritLog *log.Logger + DebugLog *log.Logger = log.New(DebugWriter, DebugPrefix, log.LstdFlags) + InfoLog *log.Logger = log.New(InfoWriter, InfoPrefix, log.LstdFlags|log.Lshortfile) + WarnLog *log.Logger = log.New(WarnWriter, WarnPrefix, log.LstdFlags|log.Lshortfile) + ErrLog *log.Logger = log.New(ErrWriter, ErrPrefix, log.LstdFlags|log.Llongfile) + CritLog *log.Logger = log.New(CritWriter, CritPrefix, log.LstdFlags|log.Llongfile) ) /* CONFIG */