Add missing WithLevel method to log package (#27)
This commit is contained in:
parent
c3d02683c7
commit
c2fc1c63dc
|
@ -81,6 +81,13 @@ func Panic() *zerolog.Event {
|
||||||
return Logger.Panic()
|
return Logger.Panic()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithLevel starts a new message with level.
|
||||||
|
//
|
||||||
|
// You must call Msg on the returned event in order to send the event.
|
||||||
|
func WithLevel(level zerolog.Level) *zerolog.Event {
|
||||||
|
return Logger.WithLevel(level)
|
||||||
|
}
|
||||||
|
|
||||||
// Log starts a new message with no level. Setting zerolog.GlobalLevel to
|
// Log starts a new message with no level. Setting zerolog.GlobalLevel to
|
||||||
// zerlog.Disabled will still disable events produced by this method.
|
// zerlog.Disabled will still disable events produced by this method.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue