|
package logging
|
|
|
|
import (
|
|
"github.com/rs/zerolog"
|
|
"github.com/rs/zerolog/log"
|
|
"os"
|
|
)
|
|
|
|
func InitLogging() error {
|
|
|
|
switch os.Getenv("LOG_FORMAT") {
|
|
|
|
default:
|
|
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: zerolog.TimeFieldFormat})
|
|
}
|
|
|
|
return nil
|
|
}
|