ChemSpot
ChemSpot copied to clipboard
Suppress messages of other libraries (MALLET, OPSIN etc)
Use the following Snippet:
PrintStream oldErr = System.err;
PrintStream newErr = new PrintStream(new ByteArrayOutputStream());
System.setErr(newErr);
// do your work
System.setErr(oldErr);
OPSIN's initialisation message can also be silenced using: Logger.getLogger("uk.ac.cam.ch.wwmm.opsin").setLevel(Level.ERROR); before OPSIN is instantiated.
Unless you've set the log level below INFO it should not be outputting any messages other than the initialising message.
Thanks for the information, dan. I haven't gotten around to having a look into what statement will do just that. This will save me the time. ;)