Add option to disable request logs (#887)

Closes #785
This commit is contained in:
Dany Marcoux 2024-10-17 21:47:56 +02:00 committed by GitHub
parent c177de164a
commit 6548e16baa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -268,3 +268,9 @@ When creating HTML archive snapshots, pass additional options to the `single-fil
See `single-file --help` for complete list of arguments, or browse source: https://github.com/gildas-lormeau/single-file-cli/blob/master/options.js
Example: `LD_SINGLEFILE_OPTIONS=--user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"`
### `LD_DISABLE_REQUEST_LOGS`
Values: `true` or `false` | Default = `false`
Set uWSGI [disable-logging](https://uwsgi-docs.readthedocs.io/en/latest/Options.html#disable-logging) parameter to disable request logs, except for requests with a client (4xx) or server (5xx) error response.

View file

@ -29,3 +29,9 @@ endif =
if-env = LD_LOG_X_FORWARDED_FOR
log-x-forwarded-for = %(_)
endif =
if-env = LD_DISABLE_REQUEST_LOGS=true
disable-logging = true
log-4xx = true
log-5xx = true
endif =