On Thu, Aug 3, 2017 at 9:43 PM, Leon Rosenberg <rosenberg.l...@gmail.com> wrote:
> On Thu, Aug 3, 2017 at 8:16 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > Martin, > > > > On 8/3/17 5:47 AM, Martin Knoblauch wrote: > > > is there a way to compress the localhost_access_log.#####.txt file > > > automatically after rotation? > > > > Not really. The file is rotated *during* log events, and stalling to > > compress a log file is probably not a great solution. > > > > > Alternatively/preferably is there a way to put the access logging > > > under "log4j"? > > > > Also not really, but if you are willing to write code, you can do it. > > The AccessLogValve handles its own logging to a file, but if you were > > to subclass AccessLogValve and override the "open" method and assign a > > value to the AccessLogValve.writer member that writes to a log4j > > logger, then I think you could probably do this. > > > > I believe that log4j will stall your access log during the > > compression, though, so you might want to think about whether or not > > you want to implement it this way. > > > > I think at least logback is performing file operations asynchronously to > log events so maybe using slf4j over logback would be a more reliable way. > > regards > Leon > Hi Leon, thanks for the hint. Will look into it. Cheers Martin -- ------------------------------------------------------ Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de