1

I am using the normal java.util.logging to log . Is it possible to redirect each applications log to a different file?

Example :

Application.war 's log entries to Application.log 

Application2.war 's log entries to Application2.log 

and so on ,

Not a logging expert , or would it better to just filter the ones corresponding to the app and try to automate it with script - just a thought ?

Kuf
  • 17,318
  • 6
  • 67
  • 91
Prakash R
  • 11
  • 3

3 Answers3

0

Yes, that is possible.

Please take a look at the following;

http://wpcertification.blogspot.co.uk/2008/10/using-logproperties-file.html

http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/index.jsp?topic=%2Fcom.ibm.commerce.admin.doc%2Ftasks%2Ftlslogging.htm

Do take a look at this thread as well.

Websphere Application Debug logging

Community
  • 1
  • 1
mhan
  • 373
  • 3
  • 11
  • Actually i wanted to send log from each application to a different log file. The one you mentioned would work only for separating portal and WAS logs but still i cannot separate each portlets logs . I want each log to go to a different log file – Prakash R Aug 22 '12 at 08:51
0

Yes you can use one application with one log. You only need to add one logging configuration file for one application. See this sample to learn java logging.

Sai Ye Yan Naing Aye
  • 6,622
  • 12
  • 47
  • 65
  • Thanks,but since all of websphere server apps are run under the same java process so is only one log file possible for the all the applications? – Prakash R Aug 22 '12 at 08:58
0

opted for log4j , went through its doc and found out that i can configure in the log4j.xml to redirect each apps to a different file as required (and to sysout so that i can see in RAD)

Doesn't seem possible with simple java.util.logging , but can't verify it

Prakash R
  • 11
  • 3