Skip to content

Commit

Permalink
Add option to disable request logs (#887)
Browse files Browse the repository at this point in the history
Closes #785
  • Loading branch information
dmarcoux authored Oct 17, 2024
1 parent c177de1 commit 6548e16
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/content/docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 6 additions & 0 deletions uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =

0 comments on commit 6548e16

Please sign in to comment.