Skip to content

Commit b02fd81

Browse files
committed
fix test
1 parent b9d513c commit b02fd81

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

internal/datasource/config/nginx_config_parser.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ func (ncp *NginxConfigParser) createNginxConfigContext(
232232
nginxConfigContext.AccessLogs, maxAccessLogReached = ncp.addAccessLog(
233233
accessLog,
234234
nginxConfigContext.AccessLogs)
235+
if maxAccessLogReached {
236+
slog.Warn("Maximum access log files have been reached, " +
237+
"no further access logs will be monitored")
238+
}
235239
}
236240
case "error_log":
237241
if !ncp.ignoreLog(directive.Args[0]) {

internal/datasource/config/nginx_config_parser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ func TestNginxConfigParser_checkLog(t *testing.T) {
895895
Readable: true,
896896
},
897897
},
898-
expectedLog: "Maximum access log files have been reached",
898+
expectedLog: "",
899899
maxAccessLogFiles: 2,
900900
maxAccessLogReached: true,
901901
},

0 commit comments

Comments
 (0)