Documentation
¶
Index ¶
- func ConsoleLogger() *zerolog.Logger
- func Debug() *zerolog.Event
- func Error() *zerolog.Event
- func Fatal() *zerolog.Event
- func FileLogger(fileName string) *zerolog.Logger
- func Info() *zerolog.Event
- func Log() *zerolog.Event
- func NormalError(errs ...error)
- func Panic() *zerolog.Event
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func SetLevel(l Level)
- func SetLogger(l *zerolog.Logger)
- func Trace() *zerolog.Event
- func Warn() *zerolog.Event
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsoleLogger ¶
func Debug ¶
Debug starts a new message with debug level.
You must call Msg on the returned event in order to send the event.
func Error ¶
Error starts a new message with error level.
You must call Msg on the returned event in order to send the event.
func Fatal ¶
Fatal starts a new message with fatal level. The os.Exit(1) function is called by the Msg method.
You must call Msg on the returned event in order to send the event.
func FileLogger ¶
FileLogger for product, height performance
func Info ¶
Info starts a new message with info level.
You must call Msg on the returned event in order to send the event.
func Log ¶
Log starts a new message with no level. Setting zerolog.GlobalLevel to zerolog.Disabled will still disable events produced by this method.
You must call Msg on the returned event in order to send the event.
func NormalError ¶
func NormalError(errs ...error)
func Panic ¶
Panic starts a new message with panic level. The message is also sent to the panic function.
You must call Msg on the returned event in order to send the event.
func Print ¶
func Print(v ...interface{})
Print sends a log event using debug level and no extra field. Arguments are handled in the manner of fmt.Print.
func Printf ¶
func Printf(format string, v ...interface{})
Printf sends a log event using debug level and no extra field. Arguments are handled in the manner of fmt.Printf.
Types ¶
type Level ¶
type Level int8
const ( // DebugLevel defines debug log level. DebugLevel Level = iota // InfoLevel defines info log level. InfoLevel // WarnLevel defines warn log level. WarnLevel // ErrorLevel defines error log level. ErrorLevel // FatalLevel defines fatal log level. FatalLevel // PanicLevel defines panic log level. PanicLevel // NoLevel defines an absent log level. NoLevel // Disabled disables the logger. Disabled // TraceLevel defines trace log level. TraceLevel Level = -1 )