diff --git a/backend/log.go b/backend/log.go index cba430b07..4e08f3956 100644 --- a/backend/log.go +++ b/backend/log.go @@ -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...) +}