Re: Can I get Millisecond precision in Access Logs?
It is. The docs are here: http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html I use Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=unity_access. suffix=.log pattern=%h %v %t %s %b %D %{RUNNING}c %r/ The AccessLogValve must be used and it is the %D spec that show milliseconds. Tomcat 5.5.x Regards, Dave On Sep 16, 2008, at 11:39 AM, Jonathan Mast wrote: Is it possible to obtain timestamps with millisecond precision in access logs? I don't see anything about specifying the date-time stamps on AccessLogValve page and was wondering if there wasn't a way to get this data. Tomcat 5.5 Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I get Millisecond precision in Access Logs?
Ah, but %D is the time taken to process the request in ms. It's not the timestamp. On Tue, Sep 16, 2008 at 3:14 PM, David Fisher [EMAIL PROTECTED]wrote: It is. The docs are here: http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html I use Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=unity_access. suffix=.log pattern=%h %v %t %s %b %D %{RUNNING}c %r/ The AccessLogValve must be used and it is the %D spec that show milliseconds. Tomcat 5.5.x Regards, Dave On Sep 16, 2008, at 11:39 AM, Jonathan Mast wrote: Is it possible to obtain timestamps with millisecond precision in access logs? I don't see anything about specifying the date-time stamps on AccessLogValve page and was wondering if there wasn't a way to get this data. Tomcat 5.5 Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I get Millisecond precision in Access Logs?
Jonathan Mast wrote: Is it possible to obtain timestamps with millisecond precision in access logs? One of the nice things about open source is that you can read the source code to see exactly how it does things. In this case you want http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java Look for getDate() Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I get Millisecond precision in Access Logs?
Correct, I realized after I posted. I guess you'll have to get the source code for AccessLogValve and roll your own override... I found this article via google accesslogvalve tomcat source 4th link: http://www.devx.com/Java/Article/32730/1954 includes a source code archive and the example in the article shows milliseconds on the timestamp. 5th link: http://www.docjar.com/html/api/org/apache/catalina/valves/AccessLogValve.java.html is tomcat 6 source and you quickly see what to look for in the code: 874 timeFormatter = new SimpleDateFormat(HH:mm:ss); HTH Dave On Sep 16, 2008, at 2:27 PM, Jonathan Mast wrote: Ah, but %D is the time taken to process the request in ms. It's not the timestamp. On Tue, Sep 16, 2008 at 3:14 PM, David Fisher [EMAIL PROTECTED]wrote: It is. The docs are here: http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html I use Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=unity_access. suffix=.log pattern=%h %v %t %s %b %D %{RUNNING}c %r/ The AccessLogValve must be used and it is the %D spec that show milliseconds. Tomcat 5.5.x Regards, Dave On Sep 16, 2008, at 11:39 AM, Jonathan Mast wrote: Is it possible to obtain timestamps with millisecond precision in access logs? I don't see anything about specifying the date-time stamps on AccessLogValve page and was wondering if there wasn't a way to get this data. Tomcat 5.5 Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I get Millisecond precision in Access Logs?
Does it have the %D reading? Also, I have seen on Apache web server that %D does not work properly for microseconds windows instead it is 15msec resolution due to windows timers. Basically not very usefull since some code is written correctly and is under 15Msec. I think I saw the same issue with Tomcat logging. Open source can run faster than commercial if you know what you are doing. I got Tomcat requests operating under 1 nanosecond at one point in time at the servlet level. Regards, -Tony Anecito Founder, MyUniPortal http://www.myuniportal.com --- On Tue, 9/16/08, Mark Thomas [EMAIL PROTECTED] wrote: From: Mark Thomas [EMAIL PROTECTED] Subject: Re: Can I get Millisecond precision in Access Logs? To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, September 16, 2008, 1:46 PM Jonathan Mast wrote: Is it possible to obtain timestamps with millisecond precision in access logs? One of the nice things about open source is that you can read the source code to see exactly how it does things. In this case you want http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java Look for getDate() Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]