-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Martin,

On 8/4/17 5:08 AM, Martin Knoblauch wrote:
> On Thu, Aug 3, 2017 at 7: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.
>> 
>> 
> Hmm. Smart way would be to rotate the log, continue logging to the
> new file and compress the old one "in the background". That way
> stalling would not be an issue.

Sure. But that requires more code, of course, and therefore more
complexity.

>> 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.
>> 
> 
> Writing my own class is clearly an option, but I wanted to first
> check the already available  options.
> 
> 
>> 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.
>> 
>> 
> Need to check how they are doing it. We use rolling with
> compression, but not on a high volume log like the access log.

You'd have to check to see how log4j actually does things, but I think
compression might happen in-line with the logging thread. I'm sure if
varies greatly depending upon your log4j version.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZhO6hAAoJEBzwKT+lPKRY9OgP/iG+YKDbbG3w7SaKyvOSMlzK
Y9yxQqgK0fpGO7XgMXKM0IuPh8G5EWwiNPUc5k0AbQNjCkNcTmTISzj8TUTu43HO
eyPlVOWjZRfdvetL99AxhkEDaw1j7HdsL5fi+zDi440t8sS4z4RETeT5a8DE2Vti
v80ER+EdAMJeydvOxMMGgk8nHal379aW95m1JHJQppC8V6wcbWnYr7TGVUjl+gDR
SL9fiiymrgLYvC1WhSblKQaOEpzyfhoFm4IOTwG/M5jh/coPsFj7KGdpxels69MM
B4dLdKwbECZbVJ2348rScrxjMevjRLkVlq38zw2kchk6gav9DjfF1i1nMd8piOoD
FgpXgfjn7elq9C2jaKgGodfBdc/cw04ysoZgTRss71vfcL69WW/yQ6rHMUJH0XsM
fqDmZWfXzwBBH6I4fGZuiH+Z+bzdsrSYBgWcJxlGtDE3Vf07oCljvb3W4GCXVdzq
u0qdB+YWyU0daWEErdGl4AlwCmE21HSzzwz/4RdvMJHgxgMwTs2KfF6/KCP2S1PX
Hpv5dGBSb8OWOZ8Y6I6N2Qo1VSME9WfGh4mU8X/r2rMPeBjRoOwVnG6OYPtCYSnl
TKyPpGTHf/m30A6k3uGucYaSocyNvqmP9MqCfeHEAyG/eY3ig/BY1HW65Oel5vAM
FzNKelDMwl4zqyYwDIr+
=5o3t
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to