Skip to content

Commit

Permalink
Add backend.NewLoggerWith function (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmgot authored Jul 17, 2023
1 parent 7e35a1f commit 51d836b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ import (
// Logger is the default logger instance. This can be used directly to log from
// your plugin to grafana-server with calls like backend.Logger.Debug(...).
var Logger = log.DefaultLogger

// NewLoggerWith creates a new logger with the given arguments.
var NewLoggerWith = func(args ...interface{}) log.Logger {
return log.New().With(args...)
}

0 comments on commit 51d836b

Please sign in to comment.