extra_fields
configuration to optionally enablehost
andquery_params
params 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/3
etc. 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.Logger
toLogster.Plug
. - Rename
Logster.Plugs.ChangeLogLevel
toLogster.ChangeLogLevel
. - Rename
Logster.StringFormatter
toLogster.Formatters.String
. - Rename
Logster.JSONFormatter
toLogster.Formatters.JSON
. - Specify formatter using atoms instead of module:
formatter: :json
formatter: :string
- Request state output in logs changed:
state=set
=>state=sent
state=set_chunked
=>state=chunked
- Config option
allowed_headers
changed toheaders
. - Better
mix docs
output.
- 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
Logger
backend 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
:excludes
option. Thanks to @ericmj - Uses
Jason
instead ofPoison
internally 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