Skip to content
Snippets Groups Projects
Commit 2c63bdb3 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Improve logging around SSJS-generated error page/sending

Reduce severity (to DEBUG) of "Using SSJS error page" message
Include protocol and IP address and error code in each message.
parent 70cfadec
No related branches found
No related tags found
No related merge requests found
Pipeline #9020 failed
......@@ -1602,14 +1602,14 @@ static void send_error(http_session_t * session, unsigned line, const char* mess
SAFEPRINTF3(sbuf, "%s%s%s", error_dir, error_code, startup->ssjs_ext);
}
if (!stat(sbuf, &sb)) {
lprintf(LOG_INFO, "%04d Using SSJS error page", session->socket);
lprintf(LOG_DEBUG, "%04d %s [%s] Using SSJS error page %s", session->socket, session->client.protocol, session->host_ip, error_code);
session->req.dynamic = IS_SSJS;
if (js_setup(session)) {
sent_ssjs = exec_ssjs(session, sbuf);
if (sent_ssjs) {
off_t snt = 0;
lprintf(LOG_INFO, "%04d Sending generated error page", session->socket);
lprintf(LOG_INFO, "%04d %s [%s] Sending generated error page %s", session->socket, session->client.protocol, session->host_ip, error_code);
snt = sock_sendfile(session, session->req.physical_path, 0, 0);
if (snt < 0)
snt = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment