aspose file tools*
The moose likes Websphere and the fly likes Log message in SystemOut.log in WAS5.1x using Sun's logging API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Log message in SystemOut.log in WAS5.1x using Sun Watch "Log message in SystemOut.log in WAS5.1x using Sun New topic
Author

Log message in SystemOut.log in WAS5.1x using Sun's logging API

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
How can I log messages in Application Server log (e.g., log message in SystemOut.log in WebSphere App Server) using Logging classes from Sun?

I am using code below:

import java.util.logging.*;

private static ConsoleHandler c1 = new ConsoleHandler();
logger.addHandler(c1);
logger.log(Level.WARNING, "Exception thrown while connecting to LDAP.", e);

ConsoleHandler only logs message in console, not in application log.

What do I need to do to log message in log file of app server?

I have used Log4J for this purpose before. But would like to be lightweight and would like to use Sun's own logging.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log message in SystemOut.log in WAS5.1x using Sun's logging API