Hi, On Sat, Sep 12, 2009 at 2:26 AM, Daniel Wilson <[email protected]> wrote: > First, how do I make this SimpleLog write a log file?
You don't. SimpleLog is included in Commons Logging only as a last resort when no other logging mechanism is available. Normally you always use Commons Logging with some logging mechanism like Log4J or the standard java.util.logging (JUL). The added value of using Commons Logging is that the downstream user gets to choose which logging mechanism they want to use. The easiest solution when you start from scratch is probably to use JUL. See [1] for instructions. > Second, the PDFBox library contains many log.error (or similar) calls. > > How do I get my application's logging to capture and record those ... so > that I can actually see what those exceptions or other messages are and do > something about them? Those log messages are handled by whatever logging configuration you've specified. If you just want to manually review the logs afterwards, then the normal logging mechanisms should be all you need. If instead you want to be able to programmatically act on some internal error conditions in PDFBox, then it might be better to explicitly expose that information via some PDFBox API. [1] http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html BR, Jukka Zitting
