Access Log in "real-time"
By vbkraemer on Apr 05, 2006
The user expected the access log to update in real time. In other words, they expected to access a web page and see that access reflected in the access log immediately. When it wasn't, they were concerned.
I found a work-around, that exposed a bug.... But that is a different story....
The news that you can use is in the bug report though. The lag between a web page being accessed and that access being reflected in the access log is controlled by two properties: accessLogBufferSize and accessLogWriteInterval. You can read about them. Making the values of these properties small will decrease the lag between when a user accesses a web page and when that access appears in the servers access log.
It may well slow your server down, too, so you have been forwarned...
You may be able to leverage the self-management features of the GlassFish project's implementation of Java EE 5 to remember to crank up these values (and increase your applications performance "automagically").
That is an entry for another day/author, though.
UPDATE: One of the evaluators provides information about the access log rotation algorithm that is used by the app server implemented by the GlassFish project.
After you read it you will realize why the log hardly ever rotates if you change the rotation suffix to YYYY...