- Add
status_2xx_level,status_3xx_level,status_4xx_level,status_5xx_levelconfiguration options to change the log level for different status groups. - Rename
query_paramstoqueryfor consistency. - Introduce
Logster.ChangeConfigplug to change configuration options per request. - Use Elixir 1.18+ JSON if available, else default to Jason.
- Rename
Logster.Formatters.StringtoLogster.Formatters.Logfmt. - Change
formatter: :stringoption toformatter: :logfmt.
- Add
status_2xx_level,status_3xx_level,status_4xx_level,status_5xx_levelconfiguration options to change the log level for different status groups. - Introduce
Logster.ChangeConfigplug to change configuration options per request. - Use Elixir 1.18+ JSON if available, else default to Jason.
- Rename
Logster.Formatters.StringtoLogster.Formatters.Logfmt. - Change
formatter: :stringoption toformatter: :logfmt.
extra_fieldsconfiguration to optionally enablehostandquery_paramsparams being logged.
- Introduce
Logster.attach_phoenix_logger/1, which attaches a phoenix telemetry event listener for logging. This is the recommended way to use Logster with Phoenix. - Introduce
Logster.info/3,Logster.debug/3,Logster.warning/3,Logster.error/3etc. These functions mimic those provided by the elixir logger, which outputs messages in your chosen log format. - Logs socket events.
- Move all configuration options to be set through
config.exs. - Rename
Logster.Plugs.LoggertoLogster.Plug. - Rename
Logster.Plugs.ChangeLogLeveltoLogster.ChangeLogLevel. - Rename
Logster.StringFormattertoLogster.Formatters.String. - Rename
Logster.JSONFormattertoLogster.Formatters.JSON. - Specify formatter using atoms instead of module:
formatter: :jsonformatter: :string
- Request state output in logs changed:
state=set=>state=sentstate=set_chunked=>state=chunked
- Config option
allowed_headerschanged toheaders. - Better
mix docsoutput.
- By default logs responses with 5xx status code with error level and 4xx responses with warning level.
- #23 No longer raises an error if a map can not be encoded in JSON. Thanks to @paulanthonywilson
- #22 Print inspect output for unexpected param values. Thanks to @rubysolo
- #18 Remove duplication of metadata in logs. Thanks to @novaugust
- Any metadata that needs to be logged needs to now be setup in the
Loggerbackend configuration. This is so that metadata configuration is centralised and so that there is no duplication of metadata in the logged output. See Issue#17 for more details.
- #16 Support for when struct params, providing compatibility with Open API Spex. Thanks to @juantascon
- #15 Adds
:excludesoption. Thanks to @ericmj - Uses
Jasoninstead ofPoisoninternally for formatting
- Handles case when params are not fetched, such as when logging static assets
- #13 Ability to rename the fields being logged. Thanks to @pbrudnick
- Fixes issue where all strings were getting url encoded in log output
- #10 Fixes issue where an exception was thrown when params contains
%. Thanks to @tsubery
- Add HTTP header logging. Thanks to @zepplock
- Add custom metadata to the log. Thanks to @tanguyantoine
- Introducing custom formatters with String and JSON formatters built in. Thanks to @mootpointer
Initial release