Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lager logger fix for numerous logger info messages in log not working in 21.2 and 1.8.0 #123

Closed
shifters67 opened this issue Jan 28, 2019 · 4 comments

Comments

@shifters67
Copy link

The fix on the main page for numerous info logging messages from amqp works fine in elixir 1.7.4 (erlang 20.1.7) but no longer works with 1.8.0 (erlang 21.2.2)

Is there a work around for this as my logs are getting lots of unnecessary messages

Thanks

Tom

@ono
Copy link
Collaborator

ono commented Feb 5, 2019

I can't reproduce the issue with 1.8.1 with OTP 21.2.

I added logger to application in mix.exs with:

  def application do
    [applications: [:lager, :amqp_client, :logger]]
  end

Then commented out all lines in config/config.exs and run mix test.
👉 Confirmed so many logs shown

Then added this config to config/config.exs then run mix test.

config :logger,
  handle_otp_reports: false

👉 logs are no longer shown but you would see a message saying "16:02:47.036 [warning] lager_error_logger_h dropped 182 messages in the last second that exceeded the limit of 50 messages/sec"

Then add the following line in config/config.exs and run mix test again.

config :lager,
  error_logger_redirect: false

👉 Now it stops showing any unnecessary messages.

Can you share a small sample project which helps me to reproduce the issue?

@ono
Copy link
Collaborator

ono commented Feb 5, 2019

This seems to be another solution. #110 (comment)

I will add this to README.

@shifters67
Copy link
Author

Hi Ono,

#110 comment fixed it nicely!

i did try your suggestions above but it didn't make any difference - it was still the same.

thanks

Shifters

@ono
Copy link
Collaborator

ono commented Feb 5, 2019

Great. Kudos to @AndrewDryga 👏 👏

It's on README now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants