Credo Logging
Checks to help with proper logger usage.
CredoLogging.NonStructuredLog- check if there is non-structured message passed as a log messageCredoLogging.ReportCb- check if there are structured log messages without accompanying:report_cbcallback. It also check whether specified callback is a remote function capture.
Installation
The package can be installed by adding credo_logging to your list of
dependencies in mix.exs:
def deps do
[
{:credo_logging, "~> 0.1.0"}
]
end
And then add to your .credo.exs:
%{
# …
checks: %{
enabled: [
# …
{CredoLogging.NonStructuredLog, []},
{CredoLogging.ReportCb, []}
]
# …
}
}
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/credo_logging.