Skip to content

Commit

Permalink
Add Core function to logp.Logger to allow access to backing zapcore.C…
Browse files Browse the repository at this point in the history
…ore. (#88)
  • Loading branch information
blakerouse committed Nov 7, 2022
1 parent 10d7092 commit a3029bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions logp/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ func (l *Logger) Sync() error {
return l.logger.Sync()
}

// Core returns the backend zapcore.Core for the logger.
func (l *Logger) Core() zapcore.Core {
return l.logger.Core()
}

// L returns an unnamed global logger.
func L() *Logger {
return loadLogger().logger
Expand Down

0 comments on commit a3029bb

Please sign in to comment.