var G … var L … type loggerKey … type Fields … type Entry … const RFC3339NanoFixed … type Level … const TraceLevel … const DebugLevel … const InfoLevel … const WarnLevel … const ErrorLevel … const FatalLevel … const PanicLevel … // SetLevel sets log level globally. It returns an error if the given // level is not supported. // // level can be one of: // // - "trace" ([TraceLevel]) // - "debug" ([DebugLevel]) // - "info" ([InfoLevel]) // - "warn" ([WarnLevel]) // - "error" ([ErrorLevel]) // - "fatal" ([FatalLevel]) // - "panic" ([PanicLevel]) func SetLevel(level string) error { … } // GetLevel returns the current log level. func GetLevel() Level { … } type OutputFormat … const TextFormat … const JSONFormat … // SetFormat sets the log output format ([TextFormat] or [JSONFormat]). func SetFormat(format OutputFormat) error { … } // WithLogger returns a new context with the provided logger. Use in // combination with logger.WithField(s) for great effect. func WithLogger(ctx context.Context, logger *Entry) context.Context { … } // GetLogger retrieves the current logger from the context. If no logger is // available, the default logger is returned. func GetLogger(ctx context.Context) *Entry { … }