Hi, >We are using a third-party tool where its debugger >only has the method 'getDebugStream(PrintStream s)' >to config its debug io stream.
OK. >We want to use log4j, which means we need to pass >the streams associated with an Appender (file or >socket appender). Can this be done and how to >get the stream of an Appender? I'm not sure how you would this. There are several reasons against this. One reason, for example, is that log4j is thread safe, and if it exposes its streams for manipulation by other components, they might lock the streams, hence potentially locking log4j. Another reason is that log4j conceptually doesn't want you to concern yourself with streams per-se, only loggers, appenders, and the like. Perhaps a solution to your problem would be: set your 3rd party tool print stream to System.out or System.err, then configure a log4j console appender to grab messages headed to System.out and/or System.err. This extra level of redirection, while slowing down logging, will keep your 3rd party tool and log4j both happy and decoupled. Yoav Shapira Millennium ChemInformatics
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>