Closed lanzhiheng closed 4 years ago
why will you reset the log file at every deploy ?
@seuros After too much deploy, the log about puma grew bigger.
Sometimes I want to restrict the logs's size in my project. Like this. But I think that puma can't do the same as Rails's log by configuring the size of the it
logger = ActiveSupport::Logger.new(Rails.root.join('log/production.log'), 0, 10.megabytes)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
So, to handle this problem, I think it will be better to reset the log file at every deploy.
If you consider it is acceptable, I can push a commit for this tweak.
that not a deployment responsability . You should not fix this issue by redeploying.
Checkout logrotate , https://en.wikipedia.org/wiki/Log_rotation
Thanks for your advice. I will check it later.
I think we should make the last argument in
stdout_redirect
configurable.Fetch the value in our template