diff --git a/api/grpc/mpi/v1/command.pb.go b/api/grpc/mpi/v1/command.pb.go index 0e3edb591..0804228b7 100644 --- a/api/grpc/mpi/v1/command.pb.go +++ b/api/grpc/mpi/v1/command.pb.go @@ -8,7 +8,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.4 +// protoc-gen-go v1.36.5 // protoc (unknown) // source: mpi/v1/command.proto diff --git a/api/grpc/mpi/v1/common.pb.go b/api/grpc/mpi/v1/common.pb.go index 7451f04fc..1bef8b1fd 100644 --- a/api/grpc/mpi/v1/common.pb.go +++ b/api/grpc/mpi/v1/common.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.4 +// protoc-gen-go v1.36.5 // protoc (unknown) // source: mpi/v1/common.proto diff --git a/api/grpc/mpi/v1/files.pb.go b/api/grpc/mpi/v1/files.pb.go index 36792a589..13b3ce5e4 100644 --- a/api/grpc/mpi/v1/files.pb.go +++ b/api/grpc/mpi/v1/files.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.4 +// protoc-gen-go v1.36.5 // protoc (unknown) // source: mpi/v1/files.proto diff --git a/internal/watcher/instance/nginx_config_parser.go b/internal/watcher/instance/nginx_config_parser.go index 505c41098..26e698ed6 100644 --- a/internal/watcher/instance/nginx_config_parser.go +++ b/internal/watcher/instance/nginx_config_parser.go @@ -129,6 +129,10 @@ func (ncp *NginxConfigParser) createNginxConfigContext( if !ncp.ignoreLog(directive.Args[0]) { errorLog := ncp.errorLog(directive.Args[0], ncp.errorLogDirectiveLevel(directive)) nginxConfigContext.ErrorLogs = append(nginxConfigContext.ErrorLogs, errorLog) + } else { + slog.WarnContext(ctx, fmt.Sprintf("Currently error log outputs to %s. Log monitoring "+ + "is disabled while applying a config; "+"log errors to file to enable error monitoring", + directive.Args[0]), "error_log", directive.Args[0]) } case "root": rootFiles := ncp.rootFiles(ctx, directive.Args[0]) @@ -185,7 +189,7 @@ func (ncp *NginxConfigParser) createNginxConfigContext( func (ncp *NginxConfigParser) ignoreLog(logPath string) bool { logLower := strings.ToLower(logPath) - ignoreLogs := []string{"off", "/dev/stderr", "/dev/stdout", "/dev/null"} + ignoreLogs := []string{"off", "/dev/stderr", "/dev/stdout", "/dev/null", "stderr", "stdout"} if strings.HasPrefix(logLower, "syslog:") || slices.Contains(ignoreLogs, logLower) { return true diff --git a/internal/watcher/instance/nginx_config_parser_test.go b/internal/watcher/instance/nginx_config_parser_test.go index 2c5f632d8..c0c320831 100644 --- a/internal/watcher/instance/nginx_config_parser_test.go +++ b/internal/watcher/instance/nginx_config_parser_test.go @@ -927,6 +927,20 @@ func TestNginxConfigParser_ignoreLog(t *testing.T) { expected: false, expectedLog: "Log being read is outside of allowed directories", }, + { + name: "Test 10: log stderr", + logPath: "stderr", + excludeLogs: []string{}, + expected: true, + expectedLog: "", + }, + { + name: "Test 11: log stdout", + logPath: "stdout", + excludeLogs: []string{}, + expected: true, + expectedLog: "", + }, } for _, test := range tests {