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

Method redirectSystemErr

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

Redirects all output sent to System.err 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

69 * remove the prefix.
70 */
71 public static void redirectSystemErr(String prefix) {
72 if (originalSystemErr == null) { // has no effect if System.out is already replaced
73 originalSystemErr = System.err; // remember the original System.out stream
74 temporarySystemErr = new LogStream(prefix);
75 System.setErr(temporarySystemErr);
76 }
77 }
78
79 /**
80 * Returns the redirection stream for {@code System.out} if it exists.

Callers 1

redirectSystemMethod · 0.95

Calls 1

setErrMethod · 0.80

Tested by

no test coverage detected