The express.js server that handles Angular Universal server-side rendering can log extended information.
# docker-compose.yml
services:
pwa:
environment:
LOGLEVEL: 'info' # trace, debug, info, warn, error, fatal - default: error
LOGFORMAT: 'json' # text, json - default: json (ECS-compatible)The log level is controlled by the environment variable LOGLEVEL with the levels trace, debug, info, warn, error (default) and fatal.
When HTTP requests and responses are logged, the log level is determined by the response status code:
infowarnerror (default)The SSR application supports two log formats controlled by the environment variable LOGFORMAT:
json (default): Uses pino for high-performance structured JSON logs compliant with the Elastic Common Schema (ECS) specificationtext: Uses pino with pino-pretty for human-readable text logsSSR request processing produces two separate log entries with different message field values:
SSR: Logged when SSR starts processing a request (always at info level)RES: Logged when SSR finishes processing and sends the response (log level depends on response status code)Redirect actions of the Hybrid Approach are logged with RED (Hybrid redirect).
PM2 process manager logs will still appear regardless of the LOGLEVEL configuration, as they are infrastructure-level logs.
The NGINX image that provides multi-channel configuration uses custom logging formats for structured output.
# docker-compose.yml
services:
nginx:
environment:
LOGLEVEL: 'info' # info (all), warn (4xx+5xx), error (5xx) - default: error
LOGFORMAT: 'json' # text, json - default: json (ECS-compatible)
# DEBUG: 1The log level is controlled by the environment variable LOGLEVEL with the levels info, warn and error (default).
HTTP requests and responses are logged with log levels based on the response status code:
infowarnerror (default)NGINX supports two log formats controlled by the environment variable LOGFORMAT:
json (default): Uses a custom-defined JSON log format compliant with the Elastic Common Schema (ECS) specificationtext: Uses a plain text log formatThe environment variable DEBUG=1 enables verbose debugging output in the NGINX logs.
Both the SSR and NGINX containers write all logs exclusively to stdout.
Both NGINX and SSR logs include a trace.id field that allows correlating all log entries for a single request across the entire stack.
X-Request-ID header (from an upstream proxy/CDN) or generates a new UUID.X-Request-ID header.X-Request-ID is returned in the response header for client-side debugging.Simplified log sequence with the same trace.id and LOGLEVEL=info:
| timestamp | trace.id | logger | message | url |
|---|---|---|---|---|
| 15:00:57.040 | 2f832... | Server | SSR | /en/home;lang=en_US;... |
| 15:00:57.284 | 2f832... | SSRLogInterceptor | GET | .../configurations |
| ... | ... | SSRLogInterceptor | GET | (more ICM API calls) |
| 15:00:57.696 | 2f832... | Server | RES | /en/home;lang=en_US;... |
| 15:00:57.696 | 2f832... | Server | GET | /en/home;lang=en_US;... |
| 15:00:57+00:00 | 2f832... | nginx | GET /en/home 200 16555 - 0.661 s | /en/home |
When NGINX serves a cached response (nginx.cache.status field indicates HIT), only the NGINX log entry appears (SSR is not involved).
The nginx logs include a nginx.timestamp_ms field containing the Unix epoch timestamp in milliseconds, which can be useful for precise timing analysis and log correlation.
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Website, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.