MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / redirectSystemOut

Method redirectSystemOut

ij/src/main/java/ij/io/LogStream.java:57–63  ·  view source on GitHub ↗

Redirects all output sent to System.out to ImageJ's log console. @param prefix The prefix string inserted at the start of each output line. Pass null to use the default prefix or an empty string to remove the prefix.

(String prefix)

Source from the content-addressed store, hash-verified

55 * remove the prefix.
56 */
57 public static void redirectSystemOut(String prefix) {
58 if (originalSystemOut == null) { // has no effect if System.out is already replaced
59 originalSystemOut = System.out; // remember the original System.out stream
60 temporarySystemOut = new LogStream(prefix);
61 System.setOut(temporarySystemOut);
62 }
63 }
64
65 /**
66 * Redirects all output sent to <code>System.err</code> to ImageJ's log console.

Callers 1

redirectSystemMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected