-----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.

What is your operating system? If it were me, I think I'd write a cron
job to check the directory for uncompressed, rotated log files and
compress them in a separate process.

> I am on Tomcat 7.0.62 (no, do not tell me to update. I know. I want
> to. But I am not allowed to. So, do not tell me. Please :-)

You should upgrade :)

Actually, 7.0.62 is pretty good. Most people say "I'm using Tomcat
7.0.13" or whatever. Your version is at least younger than my kids.

You might want to make your decision makers aware of several important
security issues with Tomcat 7.0.x that have been patched after the
version you are using. Have a look at the changelog[1] specifically
for versions 7.0.75 and 7.0.77. Depending upon your use of Tomcat's
various features, versions 7.0.68, 7.0.70, 7.0.73, and 7.0.78 might be
concerning to you.

- -chris

[1] http://tomcat.apache.org/security-7.html
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZg1phAAoJEBzwKT+lPKRYLy0P/jzNNe/5dCzCZSpwkkKobamt
/eroSyMkR+8CiU2i6AbnGrXmhqDUsif3UQJgBik76wscK9V+BqCatcLEMxY2R9Yu
1EOFAexBwC3mhjwXJLjxITMiECmIEhvwxykb+n7EbXQ+OP7xA7b6MHoGAKjXKc8v
KFnnSKUr90D9tRYjGoKqPdDYaaVjo7qZVx6kHwLCl3aw+NGlrDMlzQYkY/mQzaBc
IDO3YhbQss39GDLGrdF02kNuDkK6xwbikSvObwS7dbA2suGyUUyfweU5AA8BkUi0
hrvwgfMuHJFxKF++LiR2AJDga+qpT+3cYt06wzTc4bNjk7FLrnF5s6Y624nddoPV
9kzfuhSoTWA4xWlX8pIOMkx9B7TrDZT/Y2hnnUZuvBDQLpvgM4qtWgRS/CR+4l+0
0ScxLLwzTHeZGLnjut7bN1JLjDUopt4Su+loPeO11AfFbkhhEbrk42RM68Q4FzfP
2cnHK+lKGHhwhrFIiw5l7cpir4UJyuFjM1Bz9AJ98xnpROqbYXTeSfwMpSZfLAf2
pANppcqc0HczZvSJY9BfxY9UCgoLVGc9UeUd1NV5ecb57GkEcElXriHBAPOonrbQ
0xCNLp1f6gLIWzpwrrBSMPe61x6zJMxl0pb3c6jpKnDUQnCeoP4YK9rERYv2giw1
fUEQn+EFIqRfNuKmKt5j
=fZ5s
-----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