ChemSpot icon indicating copy to clipboard operation
ChemSpot copied to clipboard

Suppress messages of other libraries (MALLET, OPSIN etc)

Open rockt opened this issue 12 years ago • 2 comments

Use the following Snippet:

PrintStream oldErr = System.err;
PrintStream newErr = new PrintStream(new ByteArrayOutputStream());
System.setErr(newErr);

// do your work

System.setErr(oldErr);

rockt avatar Sep 07 '12 13:09 rockt

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.

dan2097 avatar Sep 29 '12 10:09 dan2097

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. ;)

thuber avatar Sep 29 '12 16:09 thuber