Closed julitrows closed 7 years ago
Ok, turns out that simply doing:
config.logstasher.logger = Logger.new(Rails.root.join('log', "logstash_#{Rails.env}.log"), 'daily')
or
config.logstasher.logger = Logger.new(Rails.root.join('log', "logstash_#{Rails.env}.log"), 2, 1.megabytes)
...should be enough. Should have tried that from the start, but didn't see in the doc a clear hint at it.
Hello,
I've got logstasher configured on an application that rotates log files differently depending on the env:
This produces two files:
environment_a.log
andenvironment_a.log.0
, that get ditched as they reach 1mb (.log
becomeslog.0
and the former.log.0
is removed, and a new.log
is created)And then:
This produces:
environment_b.log
(current file), and when the day changes, that file gets the date appended (environment_b.log.20170416
), and the daily files are kept.So, is there a way I can configure
logstasher
to produce thelogstasher_environment_x.log
files in the same fashion?Thanks