tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan E. Markovic" <i...@sculptlight.com>
Subject RE: How do I redirect console messages to a log file?
Date Wed, 24 Jan 2001 16:20:18 GMT
Erick ,

I asked this question a while ago but received no satisfactory reply; 
so here is what what I managed to work out myself. I use Unix and 
this is works perfectly. I often open up a session and tail -f the 
tomcat.err log. I also have a Servlet written that allows me to 
remotely view 'n' lines of any of the logs inside a web browser. So 
if I am off site I can dump the contents of the error logs on demand 
(without the need of an SSH client) from any machine. Basic stuff but 
really useful.

This may wrap onto a couple of lines in your email, but it is one 
line. The log file that I end up watching is tomcat.err that has the 
most interesting info. Not that I have any errors in my code that 
need trapping!

Good luck, let me know if this works for you Erick.

  /export/home/tomcat/jakarta-tomcat/bin/startup.sh > 
/export/home/tomcat/jakarta-tomcat/logs/tomcat.out 2> 
/export/home/tomcat/jakarta-tomcat/logs/tomcat.err

I v a n ...


>  >From a posting I've unearthed from jGuru.com, it stated that redirecting the
>messages is as simple as using the command:
>	startup.sh > output.log
>in Unix. As I have mentioned, I am running in a Win NT environment. I have
>tried the DOS of equivalent of piping the output by:
>	\bin\startup > tomcat.log
>but the trace() lines are still being sent to the console instead of the log
>file.
>
>What else is there that I could do?
>
>-----Original Message-----
>From: Samson, Lyndon [IT] [mailto:lyndon.samson@ssmb.com]
>Sent: 24 January 2001 16:47
>To: tomcat-user@jakarta.apache.org
>Subject: RE: How do I redirect console messages to a log file?
>
>
>If you are using *nix you could look up the system command tee, but if
>apache is using stderr it wont work. Its pretty easy to write a little C
>program ( someone prob. already has ) to do this.
>
>PS I knew a guy who used to work @ reef, Ross Dyson ring a bell?
>
>
>
>-----Original Message-----
>From: Erick Ramirez [mailto:eramirez@reef.com]
>Sent: Wednesday, January 24, 2001 3:28 PM
>To: tomcat-user@jakarta.apache.org
>Subject: How do I redirect console messages to a log file?
>
>
>I am running Tomcat 3.2.1 on top of Apache 1.3 in a NT Environment.
>
>I have tried modifying the <Logger> element in server.xml so that it reads:
>
><Logger name="tc_log"
>             path="logs/tomcat.log"
>             verbosityLevel = "DEBUG"
>/>
>
>but it seems to only report "Context" messages, as well as exceptions.
>
>I have tried modifying wrapper.properties so that it reads:
>
>wrapper.stdout=$(wrapper.tomcat_home)\logs\stdout.log
>wrapper.stderr=$(wrapper.tomcat_home)\logs\stderr.log
>
>
>and once again, it only reports some of the messages to these files and most
>of the trace lines are still being reported to the console.
>
>I am using a trace() which by default, sends messages to System.out and I
>would like these lines to be piped into a log file.
>
>Can anyone help?
>
>Regards,
>
>ERICK RAMIREZ
>ControlServlet Team
>eramirez@reef.com <mailto:eramirez@reef.com>
>
>REEF SA/NV
>Tour Gallieni II
>36, ave du Gen de Gaulle
>93006 Bagnolet FRANCE
>Tel +33 1 5582 9449
>
>www.reef.com <http://www.reef.com/>
>
>
>Business is Dynamic. Take Control.
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, email: tomcat-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, email: tomcat-user-help@jakarta.apache.org

-- 
Ivan Markovic
SculptLight
http://www.sculptlight.com
(+353) 87 2939256
(+353) 1 2982205

114 Lower Churchtown Rd,
Dublin 14,
Ireland.

Mime
View raw message