Skip to content

Commit

Permalink
Merge pull request #16 from Chocohead/logging
Browse files Browse the repository at this point in the history
Avoid closing System#out
  • Loading branch information
Fox2Code authored Mar 31, 2024
2 parents 4af4bbf + dbce274 commit 672e757
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,14 @@ public synchronized void publish(LogRecord record) {

private static class SystemOutConsoleHandler extends ConsoleHandler {
SystemOutConsoleHandler() {
setOutputStream(System.out);
setFormatter(new FoxLoaderConsoleLogFormatter());
setLevel(Level.ALL);
}

@Override
protected synchronized void setOutputStream(OutputStream out) throws SecurityException {
super.setOutputStream(System.out);
}
}

private static class CantInstallLoggerHelperException extends Exception {
Expand Down

0 comments on commit 672e757

Please sign in to comment.