Skip to content

Commit

Permalink
[Truffle] Fix logger when output is not a TTY.
Browse files Browse the repository at this point in the history
* System.console() would be null.
* Log to stderr, not stdout.
* Fixes #4327.
  • Loading branch information
eregon committed Nov 21, 2016
1 parent d6b317b commit acad490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion truffle/src/main/java/org/jruby/truffle/Log.java
Expand Up @@ -28,7 +28,7 @@ private static Logger createLogger() {

@Override
public void publish(LogRecord record) {
System.console().format("[ruby] %s %s%n", record.getLevel().getName(), record.getMessage());
System.err.printf("[ruby] %s %s%n", record.getLevel().getName(), record.getMessage());
}

@Override
Expand Down

0 comments on commit acad490

Please sign in to comment.