Skip to content

Commit 899e152

Browse files
committed
Add a system property for suppressing the console
Note that this change does not enforce compliance, but merely exposes a property constant for use in downstream console implementations. Some use cases produces a mountainous torrent of output to System.(err|out), and the graphical console cannot keep up. While I would argue that these use cases should be altered to use the LogService at appropriate logging levels, it is still nice to have a way to disable the graphical console to sidestep such problems. However, we don't want to make it too easy for naive users to disable the graphical console -- otherwise we will be back to where we started with people reporting "silent failure" bugs because the associated output was suppressed.
1 parent 7e2000c commit 899e152

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/scijava/ui/console/ConsolePane.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
public interface ConsolePane<C> extends UIComponent<C>, OutputListener {
4444

45+
/** System property which, if set, suppresses the SciJava console window. */
46+
String NO_CONSOLE_PROPERTY = "scijava.noConsole";
47+
4548
/** Appends the given output to the console. */
4649
void append(OutputEvent event);
4750

0 commit comments

Comments
 (0)