summaryrefslogtreecommitdiffstats
path: root/modules/log/logger_impl.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/log/logger_impl.go')
-rw-r--r--modules/log/logger_impl.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/log/logger_impl.go b/modules/log/logger_impl.go
index c7e8fde3c0..abd72d326f 100644
--- a/modules/log/logger_impl.go
+++ b/modules/log/logger_impl.go
@@ -228,9 +228,9 @@ func (l *LoggerImpl) GetLevel() Level {
return Level(l.level.Load())
}
-func NewLoggerWithWriters(ctx context.Context, writer ...EventWriter) *LoggerImpl {
+func NewLoggerWithWriters(ctx context.Context, name string, writer ...EventWriter) *LoggerImpl {
l := &LoggerImpl{}
- l.ctx, l.ctxCancel = context.WithCancel(ctx)
+ l.ctx, l.ctxCancel = newContext(ctx, "Logger: "+name)
l.LevelLogger = BaseLoggerToGeneralLogger(l)
l.eventWriters = map[string]EventWriter{}
l.syncLevelInternal()