• 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

use of commons-logging under was 5.0

 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I try to use commons-logging inside my application to generate custom log files. As far as I see, WAS 5.0 use commons-logging for his own logging and register a custom LogFactory in the ws-commons-logging.jar.
How is it possible to change the factory to Log4J without changing the WAS logging? I try it on my own, but there are serveral problems with starting websphere, after changing the factory.
Thank you
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe Benoit solved that problem in this thread.
Please let us know if that fixes your problem.
Kyle
 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Kyle.
 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Integrating Jakarta Commons Logging with IBM WebSphere Application Server V5
http://www-1.ibm.com/support/docview.wss?uid=swg27004610
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kyle et. al:
Thanks for the information on the logging solution, but it doesn't work.
Per the referenced document:
"Caviat: this solution is sensitive to changes regarding WebSphere's employment of the commons-logging.properties file to integrate the TrLog feature. If future versions of WebSphere utilize the �LogFactory file to specify the TrLogFactory implementation, this solution will be ineffectual unless PARENT_LAST classloader delegation is also employed. The following sections discuss the warrant for using PARENT_LAST classloader delegation. "
The key is this: WAS v5 ALREADY uses the commons-logging.properties file to integrate the TrLog feature! I tried both the EAR and WAR solutions provided/recommended and neither worked without the PARENT_LAST setting.
To see for yourself, pop open AppServer/lib/ws-commons-logging.jar and peek at the content of commons-logging.properties. It points to the TrLogFactory. Because this is on the core server classpath, it cannot be overridden without a file before it on the classpath, which is impossible to do without the PARENT_LAST setting.
--David
 
This will take every ounce of my mental strength! All for a tiny ad:
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!