Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Auto set logging filter #8051

Merged
merged 3 commits into from
Aug 11, 2020
Merged

Auto set logging filter #8051

merged 3 commits into from
Aug 11, 2020

Commits on Aug 11, 2020

  1. Move setting of Filter into code.

    We do this to prevent foot guns. The default config uses a MemoryFilter,
    but users are free to change to logging to files directly. If they do
    then they have to ensure to set the `filters: [context]` on the right
    handler, otherwise records get written with the wrong context.
    
    Instead we move the logic to happen when we generate a record, which is
    when we *log* rather than *handle*.
    
    (It's possible to add filters to loggers in the config, however they
    don't apply to descendant loggers and so they have to be manually set on
    *every* logger used in the code base)
    erikjohnston committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    0304ad0 View commit details
    Browse the repository at this point in the history
  2. Newsfile

    erikjohnston committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    e1af09d View commit details
    Browse the repository at this point in the history
  3. Update changelog.d/8051.misc

    Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
    erikjohnston and richvdh authored Aug 11, 2020
    Configuration menu
    Copy the full SHA
    3c796e4 View commit details
    Browse the repository at this point in the history