func Initialize()

in log/initialization.go [21:40]


func Initialize(opts ...LoggerOption) (io.Closer, error) {
	conf := applyLoggerOptions(opts)

	// Being unable to open the output file will cause an error
	writer, closer, err := getOutputWriter(conf)
	if err != nil {
		return closer, err
	}

	conf.logger.SetFormatter(conf.buildFormatter())
	conf.logger.SetLevel(conf.level)
	conf.logger.SetOutput(writer)

	// Only output the warnings _after_ the logger has been configured
	for _, warning := range conf.warnings {
		conf.logger.Warn(warning)
	}

	return closer, nil
}