-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
rake log:clear task updated #22703
rake log:clear task updated #22703
Conversation
pramodshinde
commented
Dec 19, 2015
- Avoided truncating all files if no ENV['LOGS'] specified
- Updated task to accept LOGS=all for truncating all files from log/ i.e. log/*log
- If no LOGS specified will truncates standard environment log files i.e. 'development,test,staging,production'
- CHANGELOG update added
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @kaspth (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
elsif ENV['LOGS'] | ||
log_files_to_truncate(ENV['LOGS']) | ||
else | ||
log_files_to_truncate("development,test,staging,production") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
staging
is not a default Rails environment. Could you remove it from here? Also from the documentation.
I made some comment. After you fixed them make sure you squashed your commits. |
27c4e6b
to
4faab0e
Compare
@rafaelfranca I updated PR as you suggested and squashed commits. |
Seems like there's failures in Railties, can you inspect? |
4faab0e
to
b3a7342
Compare
@rafaelfranca @kaspth Now in this PR I kept default files to truncate are |
- Avoided truncating all files if no ENV['LOGS'] specified - Updated task to accept LOGS=all for truncating all files from log/ i.e. log/*log - If no LOGS specified will truncates standard environment log files i.e. 'development,test,production' - CHANGELOG & guide update added - bin/setup test cases fixed
b3a7342
to
68f46a8
Compare
Thanks! 😁 |
In rails#22703, `log:clear` task has been changed to clear only standard environment log files. However, it is often to add a non-standard environment(e.g. "staging"). Therefore, I think than it is better to clear all environments log files by default.