mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Logging: Helper to create NopLogger (#46376)
This commit is contained in:
parent
314be36a7c
commit
b1e6f7126a
@ -201,6 +201,11 @@ func New(ctx ...interface{}) *ConcreteLogger {
|
||||
return root.New(ctx...)
|
||||
}
|
||||
|
||||
// NewNopLogger returns a logger that doesn't do anything.
|
||||
func NewNopLogger() *ConcreteLogger {
|
||||
return newConcreteLogger(gokitlog.NewNopLogger())
|
||||
}
|
||||
|
||||
func with(ctxLogger *ConcreteLogger, withFunc func(gokitlog.Logger, ...interface{}) gokitlog.Logger, ctx []interface{}) *ConcreteLogger {
|
||||
if len(ctx) == 0 {
|
||||
return ctxLogger
|
||||
|
Loading…
Reference in New Issue
Block a user