I am using a java.util.logging.Logger object to log caught exceptions with calls to its severe() method. However, my hosting service does not allow users access to the Resin logs on the server. Is there a way to configure the Logger object to log runtime exceptions automatically to my own log file?
i normally use log4j - where this would be easy. however it appears java logging has self-similar facilities - to (1) init some kind of io handler, (2) associate the handler with the root logger, and (3) configure the new logger
a slightly altered sun example:
NOTE: _getLogger-by-name doesn't work this smoothly in log4j:-)
Joined: Feb 18, 2004
Hmmm. It seems the only way to use the Java logging API is to call the methods exclusively in your code. I have not found a way to log runtime exceptions automatically in a programmer-specified log file. If anyone knows how to do this, please let me know. In the meantime, I'll have to switch back to the logging framework put out by bitfactory.