If you're using log4j many different appenders are available which allow you to send log messages to several different places, or you could write your own for your application. See the log4j documentation for more details.
If you're using JUL logging I think you can do a similar thing.
I would like to receive the error information in a Java class so I can send it through UDP to an internal monitoring app. Can I do that with log4j?