Project

Profile

Help

Bug #4761

closed

Interaction of Configuration.setLogger() and Configuration.setStandardErrorOutput()

Added by Michael Kay about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2020-09-28
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:

Description

This is a spin-off of bug #4760

Configuration.setLogger() and Configuration.setStandardErrorOutput() seem to be relics of two different attempts to allow applications to redirect system messages, but neither has been well tested, and they don't play nicely together.

If I set an initializer that calls Configuration.setLogger(), then Verifier fails with an NPE trying to display the license message. The license message is sent to config.getStandardErrorOutput(), which is null if a Logger has been set. The implication is that config.setLogger() simply doesn't work. At any rate, the relationship of config.setStandardErrorOutput() and config.setLogger() is complex and poorly explained.

Tried getting around this by making the Logger extend StandardErrorLogger, but that doesn't work either, because the ErrorReporter used by the run-time Controller doesn't use the Logger registered with the Configuration.

So I'm coming to the conclusion that when running from the command line, there's no way to redirect run-time transformation warnings to a destination other than System.err.

Please register to edit this issue

Also available in: Atom PDF