This is third in my series of posts detailing my efforts to stand up a Tomcat/ACF10 development environment next to my existing Apache/JRun/ACF9 stack. For background, see the first post in the series.
Access logging in Tomcat is fairly straightforward to set up, and the official docs are very understandable. The default configuration installed with ACF10 includes an entry for access logging in ./cfusion/runtime/conf/server.xml. Toward the bottom of the file, find the <Host> element and its child access log <Valve> element.
<Host name="localhost" ... > <Valve className="org.apache.catalina.valves.AccessLogValve" directory="/tmp" prefix="access-" suffix=".log" pattern="common" rotatable="true" fileDateFormat="yyyy-MM-dd" /> ... </Host>
Most of what’s shown there is easy to understand. A couple of items are worth touching on:
- the
patternattribute specifies what gets logged for each request; as noted in the docs “common” and “combined” are short-cuts for standard sequences of commonly-used field - the
fileDatePatternattribute is used to specify the naming mask for the log file; it also specifies the frequency at which the log files are rotated if the logs are specified as being rotatable. Where this mask goes to the day level, access logs will be specified each day. - I’ve temporarily set up the access logs to be created in the
/tmpfolder just for convenience as I work through configuring; I will change this to have the logs created in a more standard (and more secure) location as I get closer to wrapping this up.
Configure your logs as needed, restart the server, bounce a couple requests off it, and verify that the access logs are present and functional.
So it is a bit of a shift, in many ways, for me to realize the merry-go-round has slowed, possibly stopped. I think I’ve found it. I’ve been running Arch Linux on my Asus netbook for several months and it fits well: very good support for the hardware and for me personally. It has the packages I want, and I love the rolling release model that keeps packages current continuously as software projects release both major and minor updates (something that always bothered me to the point of kludging work-arounds in other distributions). Over the Christmas break, I moved my older Gateway desktop to Arch, as well. That is still a work in progress, as I am wrestling with a couple of items there but I have a fairly high degree of confidence I will resolve those. (And that’s a very different box with a very different usage profile than my netbook in terms of how I use it and how frequently.)