You need configure in the file server.xml
in Server/Service/Engine:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
See more in The Valve Component
UPDATE
For to see the log file using the tail
command, you need to know the location of this log file. Using the previously defined names in Valve
example, we can have in a servlet or jsp:
<%
String location = System.getProperty("catalina.base") +
java.io.File.separator + "logs" + java.io.File.separator +
"localhost_access_log." + new java.sql.Date(System.currentTimeMillis()) +
".txt";
%>
Example with tail
:
tail -f /home/paul/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/logs/localhost_access_log.2013-05-30.txt