• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TomCat System.out redirection to Log file ?

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We just installed TomCat-3.2.1 in stand-alone mode and JVM is jdk1.2.2; Now System.out.println goes to TomCat console, we want to go to a log file. How and where to do the required set-up.
Thanks in advance.
 
Ranch Hand
Posts: 126
Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i too is going through tomcat right now. as per my knowledge a option is to make a log writer that writes to a file or u can also change your default err output to a file. for that, i think u need to connect file output stream and system.err.
nitin

 
khudiram Barik
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Nitin !
I am looking if there is any way to do set up in web.xml or server.xml or ... to direct the System.out and System.err.
In my program I have used like this
PrintStream n = new PrintStream( new FileOutputStream("c:/khudi/log.txt", true), true) ;
System.setErr(n);
System.err.println("My Error");

This works and goes to c:/khudi/log.txt but to know if we can set up somewhere instead of using the above.
Thanks.
Khudiram
reply
    Bookmark Topic Watch Topic
  • New Topic