Skip to content

Conversation

@ctrueden
Copy link
Member

MERGE ONLY IN CONCERT WITH THE OTHER 3.0.0 BRANCHES.

Log WARN and ERROR to stderr, and other levels to stdout.

See also scijava/scijava-config@dcf378f.

@ctrueden ctrueden added this to the 3.0.0 milestone Mar 16, 2015
ctrueden added 10 commits May 12, 2015 16:39
Specifically, the setLevel(String classOrPackageName, int level) method
was public in AbstractLogService, but not part of the LogService API.
This is a backwards incompatible change.
We do the level check in the level-specific methods now, in preparation
for the protected log(int level, Object msg, Throwable t) method to
become the central override point of concrete implementations. That way,
specific implementations will not need to worry about filtering based on
level in the typical case.
When logging critical messages (WARN and ERROR levels), use stderr.
When logging non-critical messages (e.g., INFO level), use stdout.

This change will be very useful for differentiating between different
log levels in a simpler way; in particular, ImageJ can send both stdout
and stderr to a Console window, coloring stderr messages in red and
setting the Console to visible when they occur, but not displaying the
Console by default when only stdout messages occur (because many ImageJ
plugins spam stdout with lots of debugging output).
@ctrueden ctrueden closed this Jul 10, 2016
@ctrueden ctrueden deleted the logging branch July 10, 2016 21:44
@ctrueden
Copy link
Member Author

Merged into sjc3 integration branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants