# `CredoHotUpgrades.Check.LoggerLocalFilter`
[🔗](https://github.com/deployex/credo_hot_upgrades/blob/main/lib/credo_hot_upgrades/check/logger_local_filter.ex#L1)

## Basics

> #### This check is disabled by default. {: .neutral}
>
> [Learn how to enable it](`e:credo:config_file.html#checks`) via `.credo.exs`.

This check has a base priority of `high` and works with any version of Elixir.

## Explanation

`:logger` filters have the same lifetime as a Telemetry handler, and the
same failure. `:logger.add_primary_filter/2` and `add_handler_filter/3`
keep whatever fun they were given for as long as the node runs it.

A closure over the module that attached it fails once that module is
replaced by a hot upgrade. `:logger` catches the error, removes the
filter, and logs `removed_failing_filter`: whatever that filter was
dropping or redacting goes through unfiltered from then on, with one line
to say the filter is gone and none to say what it was protecting.

Pass `{&MyApp.LogFilters.drop_health/2, []}`, not an `fn` or a local
capture.

## Check-Specific Parameters

*There are no specific parameters for this check.*

## General Parameters

Like with all checks, [general params](`e:credo:check_params.html`) can be applied.

Parameters can be configured via the [`.credo.exs` config file](`e:credo:config_file.html`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
