Skip to content

Commit

Permalink
Make access logs optional, defaulting to false
Browse files Browse the repository at this point in the history
Summary:
Access logs are very rarely useful, but on a routine basis they just crowd the output, making anything else invisible. The underlying data is in Scuba anyway, so nothing is lost.

The motivation for this is actually AWS, so we have less data to send back to prod (thus making e.g. log rotation less of a priority).

Reviewed By: clara-9

Differential Revision: D67792653

fbshipit-source-id: 46b6b4ba4cedf133a567583984c3cd884ce8485d
  • Loading branch information
andreacampi authored and facebook-github-bot committed Jan 3, 2025
1 parent f8ad6df commit 94750d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eden/mononoke/gotham_ext/src/middleware/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ impl LogMiddleware {
}

fn log_request_slog(logger: &Logger, state: &mut State, entry: LogEntry) -> Option<()> {
if !justknobs::eval("scm/mononoke:request_log_enabled", None, None).unwrap_or(false) {
return None;
}

let uri = Uri::try_borrow_from(state)?;
if uri.path() == "/health_check" {
return None;
Expand Down

0 comments on commit 94750d9

Please sign in to comment.