Skip to content

Commit 64ae0e7

Browse files
committed
fix(log): Fix CNS and CNI ETW log interference issue
Signed-off-by: Yerlan Baiturinov <[email protected]>
1 parent 24ea94f commit 64ae0e7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cni/log/logger_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func etwCore(loggingLevel zapcore.Level) (zapcore.Core, error) {
2626
encoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
2727
jsonEncoder := zapcore.NewJSONEncoder(encoderConfig)
2828

29-
etwcore, _, err := zapetw.New("ACN-Monitoring", etwCNIEventName, jsonEncoder, loggingLevel)
29+
etwcore, _, err := zapetw.New("ACN-Monitoring-CNI", etwCNIEventName, jsonEncoder, loggingLevel)
3030
if err != nil {
3131
return nil, errors.Wrap(err, "failed to create ETW core")
3232
}

cns/logger/cnslogger_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func getPlatformCores(loggingLevel zapcore.Level, encoder zapcore.Encoder) (zapc
1919
}
2020

2121
func getETWCore(loggingLevel zapcore.Level, encoder zapcore.Encoder) (zapcore.Core, error) {
22-
etwcore, _, err := zapetw.New("ACN-Monitoring", etwCNSEventName, encoder, loggingLevel)
22+
etwcore, _, err := zapetw.New("ACN-Monitoring-CNS", etwCNSEventName, encoder, loggingLevel)
2323
if err != nil {
2424
return nil, errors.Wrap(err, "failed to create ETW core")
2525
}

cns/logger/v2/config_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (c *Config) normalize() {
2222
c.ETW.EventName = "AzureCNS"
2323
}
2424
if c.ETW.ProviderName == "" {
25-
c.ETW.ProviderName = "ACN-Monitoring"
25+
c.ETW.ProviderName = "ACN-Monitoring-CNS"
2626
}
2727
}
2828
}

0 commit comments

Comments
 (0)