/* * Copyright (c) 2023 Laura Kalb * The code of this project is available under the MIT license. See the LICENSE file for more info. * */ package log import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "os" "time" ) var FlagDebug bool func InitializeLogger() { log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}) if FlagDebug { zerolog.SetGlobalLevel(zerolog.DebugLevel) } else { zerolog.SetGlobalLevel(zerolog.InfoLevel) } }