This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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

Log4j and WebSphere - the standard WebSphere SystemOutput.Is this how it should work?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi JavaRanch,

As per my previous discussions on the IBM website and the JavaRanch website I've had various issues that are now resolved:
http://www-128.ibm.com/developerworks/forums/thread.jspa?messageID=14045904

My new question is about *how* it should work, I'm 99% sure that this is how its supposed to work but I just want some confirmation.

I do have log4j working and logging to its own file, I will eventually customise this further.

My question is, WebSphere acts quite differently to Tomcat in regard to log4j logging, as in the use of ConsoleAppender does absolutely nothing in WebSphere.
WebSphere's JDK logging appears to still run for the SystemOut file, and it can be customised through the WebSphere interface.
AND the log4j logging also works to a file perfectly fine.

So my question is, is this the way log4j works through WebSphere?

We're logging to the commons-logging interface with log4j as an implementer but this application appears to log to both log4j (and the file specified in the properties) AND the JDK logger that WebSphere normally uses.

This is a good feature for us but I would like to confirm that we haven't done anything wrong here?

Regards,
Gareth
 
Gareth Anderson
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the end this appears to be the way it should work:
http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=194128

Provided an answer eventually.
It would appear controlling WebSphere's SystemOut with Log4j is not possible, I consider this a good feature as you get log4j logs + the dynamic control over WebSphere's logging.
 
Goodbye moon men. Hello 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!