Log files are the first place i look while debugging an application. To see the logs in real-time I am using the utility command "tail" with the "-f" option.
tail -f filename
When there are multiple log files to watch out, I used to open different xterm console to tail each file.But today I learned that "tail" can watch multiple files for changes. Example command and its output on my PC (Ubuntu 7.10).
tail -f logs/catalina.out InaWs.log InaWsUserActions.log
==> logs/catalina.out <==
[2007-12-04 09:39:18,746] INFO(ContextManager.java.initialize:56) - Context [vpn] initialized.
[2007-12-04 09:39:18,760] INFO(ContextManager.java.initialize:56) - Context [prepaid] initialized.
[2007-12-04 09:39:18,761] INFO(InaWsImpl.java.initialize:116) - Using auhentication factory : com.oksijen.inox.common.ws.auth.PlaintextAuthenticationFactory
Dec 4, 2007 9:39:19 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate
INFO: WSSERVLET14: JAX-WS servlet initializing
==> InaWs.log <==
[2007-12-04 09:39:18,743] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (InaWsContext.java.addAction:41) - Adding action. actionName[echoVpn]...
[2007-12-04 09:39:18,744] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (C3p0Impl.java.initialize:53) - Initializing C3P0 connection pool....
[2007-12-04 09:39:18,757] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (InaWsContext.java.addAction:41) - Adding action. actionName[echoPrepaid]...
[2007-12-04 09:39:18,758] INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (C3p0Impl.java.initialize:53) - Initializing C3P0 connection pool....
==> InaWsUserActions.log <==
20071204093501054 REQ 117787e671a35c5c03e072efbd53bad3cea0ae49 root prepaid echoPrepaid [test]
20071204093501054 RES 117787e671a35c5c03e072efbd53bad3cea0ae49 1
20071204093520876 REQ 117787e671a35c5c03e072efbd53bad3cea0ae49 root vpn echoVpn [test]
20071204093520876 RES 117787e671a35c5c03e072efbd53bad3cea0ae49 1
20071204093530380 REQ 117787e671a35c5c03e072efbd53bad3cea0ae49 root mpbx echoMpbx []
20071204093546634 REQ 117787e671a35c5c03e072efbd53bad3cea0ae49 root mpbx listAgents []
20071204093549223 RES 117787e671a35c5c03e072efbd53bad3cea0ae49 100101
0 comments:
Post a Comment