-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Stop logging "Nothing to do" #2392
Comments
Agreed. |
|
It's not an 'issue' so much as it's unnecessary. We're being informed of something it didn't do with every request. This was added in July to "keep the user informed, vs. have them wonder if anything happened". It's just as informative to not see a message when it does nothing as it is to send a message telling us it did nothing. |
Understand that this is hard to balance with people who say things aren't verbose enough #955 (comment), #1824, #2312
Can you think of any middle ground? I agree that it seems unnecessary for every single request. |
I'd suggest the middle ground is to log it |
Those complaints are about it failing silently. This complaint is about it succeeding noisily.
I think @reggieb has a good solution: use |
Don't mean to hijack if it's unrelated, but are other people seeing this log error multiple times per request?
Or is this occurring every time an asset is referred to? |
@dwightwatson That's not hijacking at all. Seems to prove my point. |
This make me wonder. Should I configure something so it doesn't run? I am migrating to containers and after precompiling, I see this message and it's noticably slowing down development and tests. How can I stop webpacker from runnin unnecessarily? |
Surely the very nature of the method structure suggests that it is normal for it to be called often. The comment is only logged when the |
This was my mistake, I was under the impression that |
We see this in our production.log and this really irritates me. We set compile: true for production in webpacker.yml and I would expect webpacker is not active at all in production with this compile set true. Am I missing something? |
This is getting kinda ridiculous on localhost:
|
I've updated the PR to change the logger call to the debug level - so hopefully that will be a satisfactory compromise. |
Let's get this one merged! |
the 12factor gem pulled in two gem dependencies that changed two configuration values: 1. rails_serve_static_assets set serve static assets to true 2. rails_stdout_logging created a default logger that connected to STDOUT in Rails 5, these can be controlled using env vars, so we set RAILS_LOG_TO_STDOUT in NGINX stage furthermore, we don't want to enable "serve static assets" from Rails, since NGINX already serves static assets when enabled, Rails tries to serve a missing static asset for 404 request, which includes executing Webpacker::Compiler#compile though that just pollutes the log file with lines like "[Webpacker] Everything's up-to-date. Nothing to do" (rails/webpacker#2392). So ensuring we disable "serve static assets" from Rails solves this problem as well.
At the moment, a "Nothing to do" log entry is being generated every time
Webpacker::Compiler#compile
is called on non stale compiled packs.This log entry is unnecessary and I think it should be removed or at the very least set at the
:debug
level.The text was updated successfully, but these errors were encountered: