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

Allow the heartbeat debug messages to be disabled #32

Open
swelham opened this issue Jan 31, 2019 · 4 comments
Open

Allow the heartbeat debug messages to be disabled #32

swelham opened this issue Jan 31, 2019 · 4 comments

Comments

@swelham
Copy link

swelham commented Jan 31, 2019

When using many workers it is very hard to inspect other application output or to run commands when using iex -S mix due to the number of heartbeat messages being output by faktory. I believe by default these messages are output once every 15 seconds per worker, which in the case of our application is almost a continuous stream of messages.

Would it be possible to add some form of config that would allow this to be disabled?

p.s. I am happy to put together a PR if this is something you are happy to support.

@cjbottaro
Copy link
Owner

Yes, definitely. It annoys me too.

Is there a benefit to having Faktory have it's own logger, where the log level can be turned to INFO and thus not get the debug heartbeat messages, but not affect the rest of the app?

Example:

config :faktory, log_level: INFO
config :logger, :level, :DEBUG

Something like that. Or should it just use the normal logging with tagging and share the "level" as the rest of the apps, but then have a config to turn off heartbeat messages?

@cjbottaro
Copy link
Owner

cjbottaro commented Feb 3, 2019

I think I want to use something like this:
https://hex.pm/packages/flex_logger

That way you can turn faktory_worker_ex's logging to :info but keep the rest of your app at :debug. There is a lot of other :debug noise that faktory_worker_ex spits out.

What do you think?

@swelham
Copy link
Author

swelham commented Feb 3, 2019

I haven't used flex_logger before but it looks really cool. I probably need a deeper read through the docs but would this be included as a dep in faktory_worker_ex and configured through the faktory worker config? Or added to the consuming app and configured separately?

@cjbottaro
Copy link
Owner

I have those same questions and I opened an issue about it:
arnomi/elixir-flex-logger#1

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