• 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

configure catalina.out for per-app log file

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

We are using RHEL-5 and Tomcat 6.0.14. For logging We are using log4j in all of our web-apps.

how to Configure web-app specific log file for sys.out, sys.err ?

We want to configure our log file for web-app specific sys.out, sys.err messages which are currently coming in Catalina.out.

please provide some sample to show how/where to configure so we got web-app specific log for stdout.

Any Help will be Appreciated ...
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot. That's one of the reasons why webapps should use a real logger such as java.util.Log or log4J.

In fact, it's perfectly legal for a J2EE webapp server to simply discard System.out/System.err data completely and never output it anywhere at all (although fortunately, I've never seen one do so). The stdio facilities are not part of the J2EE standard.
 
Bihag Raval
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim ...

That means the only way to see app specific sys.out is converting sys.out to log.info,debug ... ?
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's only one System.out and one System.err per VM and none of the webapp servers I know of spawn separate VM instances for each application. They all run in the server's own VM.

However you can set up true logging on a per-application basis.
 
Bihag Raval
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim ...
 
reply
    Bookmark Topic Watch Topic
  • New Topic