Project

Profile

Help

Bug #4761

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

Added by Michael Kay 24 days ago. Updated 24 days ago.

Status:
New
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2020-09-28
Due date:
% Done:

0%

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

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.

History

#1 Updated by Michael Kay 24 days ago

  • Subject changed from Interaction of Configuration.setLogger() and Configuration.setStandardOutputStream() to Interaction of Configuration.setLogger() and Configuration.setStandardErrorOutput()
  • Description updated (diff)

Please register to edit this issue

Also available in: Atom PDF