Skip to content

Commit bad3056

Browse files
committed
pr feedback
1 parent 77b2d2b commit bad3056

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

internal/datasource/config/nginx_config_parser.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ func (ncp *NginxConfigParser) createNginxConfigContext(
209209
ncp.previousNAPSysLogServer = syslogServer
210210
}
211211
} else if napEnabled {
212-
slog.WarnContext(ctx, "Could not find usable NAP syslog server, "+
213-
"security violations will be unavailable")
212+
slog.WarnContext(ctx, "Could not find available local NGINX App Protect syslog server. "+
213+
"Security violations will not be collected.")
214214
}
215215

216216
fileMeta, err := files.FileMeta(conf.File)

internal/datasource/config/nginx_config_parser_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ func TestNginxConfigParser_Parse(t *testing.T) {
532532
"",
533533
),
534534
allowedDirectories: []string{dir},
535-
expectedLog: "Could not find usable NAP syslog server, security violations will be unavailable",
535+
expectedLog: "Could not find available local NGINX App Protect syslog server. " +
536+
"Security violations will not be collected.",
536537
},
537538
}
538539

@@ -649,8 +650,9 @@ func TestNginxConfigParser_SyslogServerParse(t *testing.T) {
649650
expectedSyslogServers: "",
650651
content: testconfig.NginxConfigWithMultipleSysLogs(errorLog.Name(), accessLog.Name(),
651652
"random.domain:1515", "192.168.12.34:1517", "my.domain.com:1517"),
652-
expectedLog: "Could not find usable NAP syslog server, security violations will be unavailable",
653-
portInUse: false,
653+
expectedLog: "Could not find available local NGINX App Protect syslog server. " +
654+
"Security violations will not be collected.",
655+
portInUse: false,
654656
},
655657
{
656658
name: "Test 3: Port unavailable, use next valid sever",

0 commit comments

Comments
 (0)