-
Notifications
You must be signed in to change notification settings - Fork 954
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
each log line appearing twice #1112
Comments
I now understand why this happens, but it leads me to a different question... Basically, by specifying a logger for So: new question #1: Can this output be suppressed, leaving me with ONLY my specified logger output? That would be helpful, but since I've also learned that I can format the default output by making a plugin, at a minimum I won't have to tolerate duplicate output. |
Also, adding
|
Whew. I've been struggling with this myself. Adding some additional context for future folks who stumble on this page. In case you're curious, the duplication is caused by the statement The default duplicate logging is still an issue and is fixed by #987 (unmerged). Although the default for the quiet option is supposed to be true, there's a bug due to the way And to reiterate @caljess599, you can eliminate the duplication issue in the meantime by setting |
Hi I already tried to add these lines in
The goal is to write the delayed job log in the Rails application, so that I can see the log in the pod log, not in |
I spent the last few days connecting ActiveJob and Delayed Job to New Relic, providing New Relic with structured data for jobs. There are many moving parts in the logs for jobs:
In addition, each ActiveJob job can have its own logger by setting Hence, with no squelching, your logs could contain messages from at least these four sources. I believe Sidekiq also has its own logger, if you are using it instead of Delayed Job. To make my code work with New Relic, I set |
For as long as I can recall, every log line produced by delayed_job appears twice, in two different formats. I'd love to disable this (because it's just noise) but especially because I can only manipulate one of the copies.
My log config:
The first copy has just the Worker host and pid and the message, e.g.:
The second copy includes more information, but it clearly refers to the same event:
My custom formatter can change the second format into whatever I want, but the first format still appears.
Please help! We're using v4.1.4 of this gem on Ruby 2.6.5 with Rails 5.0.0.rc2
Thanks.
P.S. I am using lograge, but I don't think that its use is related to this problem. (When I disable lograge, I still see duplicate lines for delayed_jobs.)
P.P.S. The code of my custom formatter:
The text was updated successfully, but these errors were encountered: