Add missing WithLevel method to log package (#27)

This commit is contained in:
nogoegst 2017-12-14 21:33:32 +03:00 committed by Olivier Poitrey
parent c3d02683c7
commit c2fc1c63dc

View File

@ -81,6 +81,13 @@ func Panic() *zerolog.Event {
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
// zerlog.Disabled will still disable events produced by this method.
//