Skip to content

Commit b982a31

Browse files
committed
change log
1 parent b017233 commit b982a31

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

internal/datasource/config/nginx_config_parser.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ func (ncp *NginxConfigParser) addAccessLog(accessLog *model.AccessLog,
220220
for i, log := range accessLogs {
221221
if accessLog.Name == log.Name {
222222
if accessLog.Format != log.Format {
223-
slog.Warn("Found duplicate access log with different formats. Metrics from this access log "+
223+
slog.Warn("Found duplicate access log with different formats. "+
224+
"Multiple log formats are not supported in the same access log, metrics from this access log "+
224225
"will not be collected", "access_log", accessLog.Name)
225226

226227
return append(accessLogs[:i], accessLogs[i+1:]...)

internal/datasource/config/nginx_config_parser_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,9 @@ func TestNginxConfigParser_checkLog(t *testing.T) {
652652
},
653653
},
654654
expectedAccessLogs: []*model.AccessLog{},
655-
expectedLog: "Found duplicate access log with different formats. Metrics from " +
656-
"this access log will not be collected",
655+
expectedLog: "Found duplicate access log with different formats. " +
656+
"Multiple log formats are not supported in the same access log, metrics from this access log " +
657+
"will not be collected",
657658
},
658659
}
659660

0 commit comments

Comments
 (0)