tie all loggers to global var

Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
This commit is contained in:
Dinifarb 2023-08-25 20:04:28 +02:00
parent 4add010b8d
commit fdec95bc99
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ var StopCh = make(chan bool)
func init() {
isService, err := svc.IsWindowsService()
if err != nil {
logger, err := eventlog.Open("windows_exporter")
logger, err = eventlog.Open("windows_exporter")
if err != nil {
os.Exit(2)
}