• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

application log

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to seperate applications running on the same app server "server1"
I would like to seperate the WAS created 1System.out and System.err log files for each application. Is this possible, if so how.
 
author & internet detective
Posts: 39840
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranav,
I don't think this is possible. As I recall, System.out/err are defined in the admin console on a server level, not an ear level.

Many applications have the output go to a debug log instead of System.out/err. Then they use the logging to control which output goes to which file.
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne,
but could you elaborate a little more on this
"Many applications have the output go to a debug log instead of System.out/err."

For eg., printStackTrace goes directly to the System.err log. how do I capture this.

Thanks
[ July 07, 2006: Message edited by: Pranav Sharma ]
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are looking for logging at application level. Log4J is a good open source tool. If you havnt already considered then here is the link log4j Docs

Santhosh
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
San Sreeds,
Actually I do have log4j, but I'm unable to capture e.printStackTrace on log4j logs. How would i do that. But this is a whole new question, which would have to post on a different forum
 
Jeanne Boyarsky
author & internet detective
Posts: 39840
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranav,
I was thinking of Log4j. I've never had problems with not having a full stack trace because most exceptions show enough detail and history.

If you have a legacy application that already has a lot of print stack trace, you can call System.setErr() to redirect the System.err stream to another place - like a File.
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Jeanne,
It is a legacy app, but thats probably the best solution.
 
I don't like that guy. The tiny ad agrees with me.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!