Skip to content

Disable logging by default#52

Merged
jschr merged 2 commits intomasterfrom
disable-logging-by-default
Nov 12, 2025
Merged

Disable logging by default#52
jschr merged 2 commits intomasterfrom
disable-logging-by-default

Conversation

@jschr
Copy link
Member

@jschr jschr commented Nov 10, 2025

Disable access logs by and send critical errors to stdout to prevent noisy web apps from causing unbounded log storage before the daily log rotate.

Access logs can be enabled again by setting ENABLE_ACCESS_LOGS=true and the error log level can be modified with ERROR_LOG_LEVEL.

Copilot AI review requested due to automatic review settings November 10, 2025 18:35

This comment was marked as resolved.

@jschr jschr force-pushed the disable-logging-by-default branch from bbc7358 to c99152e Compare November 10, 2025 18:54
Copilot AI review requested due to automatic review settings November 10, 2025 18:54

This comment was marked as resolved.

@jschr jschr force-pushed the disable-logging-by-default branch from c99152e to 000ba14 Compare November 10, 2025 18:56
Copilot AI review requested due to automatic review settings November 10, 2025 18:57
@jschr jschr force-pushed the disable-logging-by-default branch from 3288f82 to 596a21f Compare November 10, 2025 18:58

This comment was marked as resolved.

@jschr jschr force-pushed the disable-logging-by-default branch from 596a21f to 8cd9715 Compare November 10, 2025 19:02
Copilot AI review requested due to automatic review settings November 10, 2025 19:02
@jschr jschr force-pushed the disable-logging-by-default branch from 8cd9715 to 2e45fa5 Compare November 10, 2025 19:02

This comment was marked as resolved.

@jschr jschr force-pushed the disable-logging-by-default branch from 2e45fa5 to 3381623 Compare November 10, 2025 19:04
Copilot AI review requested due to automatic review settings November 10, 2025 19:05
@jschr jschr force-pushed the disable-logging-by-default branch from 3381623 to ba479fd Compare November 10, 2025 19:05
@jschr jschr force-pushed the disable-logging-by-default branch from ba479fd to 3dab462 Compare November 10, 2025 19:05

This comment was marked as resolved.

proxy_cache_valid 200 206 1s;

access_log ${LOG_DIR}/cache.log proxy_cache;
${CACHE_ACCESS_LOG_DIRECTIVE}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be access_log ${LOG_DIR}/cache.log proxy_cache; when ENABLE_ACCESS_LOGS=true.

Will be access_log off; when ENABLE_ACCESS_LOGS is not set (default).

proxy_ssl_server_name on;

access_log ${LOG_DIR}/range_cache.log range_cache;
${RANGE_ACCESS_LOG_DIRECTIVE}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be access_log ${LOG_DIR}/range_cache.log range_cache; when ENABLE_ACCESS_LOGS=true.

Will be access_log off; when ENABLE_ACCESS_LOGS is not set (default).


access_log ${LOG_DIR}/access.log;
error_log ${LOG_DIR}/error.log;
${ACCESS_LOG_DIRECTIVE}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be access_log ${LOG_DIR}/access.log; when ENABLE_ACCESS_LOGS=true.

Will be access_log off; when ENABLE_ACCESS_LOGS is not set (default).

access_log ${LOG_DIR}/access.log;
error_log ${LOG_DIR}/error.log;
${ACCESS_LOG_DIRECTIVE}
error_log stderr ${ERROR_LOG_LEVEL};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead log errors to stderr to be more compabitble with running in Docker.

ERROR_LOG_LEVEL is crit by default.

@jschr jschr requested a review from Jabba November 10, 2025 21:28
@jschr jschr merged commit 9cfc1d4 into master Nov 12, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants