plug_logger_json icon indicating copy to clipboard operation
plug_logger_json copied to clipboard

Remove duplicate error logging

Open johnkelly opened this issue 9 years ago • 3 comments

I haven't been able to figure out how to shut off the default non JSON error logging, so that the error is only logged in the JSON format instead of the default + JSON formats.

johnkelly avatar Oct 26 '16 21:10 johnkelly

Hi! You probably don't removed plug Plug.Logger from endpoint.ex in your project (3rd step in Installation).

mizalewski avatar Apr 01 '17 19:04 mizalewski

The "Running <Endpoint> with Cowboy using " message comes from here: https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/endpoint/cowboy_handler.ex#L100

danmcclain avatar Jul 21 '17 23:07 danmcclain

@johnkelly apart from @mizalewski's , check your Elixir Logger's log level. I had the same issue with regular logging still appearing in logs, only to realize I had :debug level logs enabled.

Make sure that:

  1. default logger is set to log only :error or :debug level,
  2. plug_logger_json is set to log on info level.

gmile avatar Nov 16 '17 15:11 gmile