feat: redirecting System.out and System.err to logger infrastructure #5
Labels
No labels
Blocked
ByBug
Blocked
ByDependency
Blocked
ByMissingFeature
Bug
Accepted
Bug
Fixed
Bug
In Progress
Bug
Invalid
Bug
ItWorksOnMyMachine
Bug
MoreInvestigation
Bug
New
Empty
FeatureRequest
Accepted
FeatureRequest
Implemented
FeatureRequest
In Progress
FeatureRequest
Invalid
FeatureRequest
New
FeatureRequest
PartiallyImplemented
FeatureRequest
WontAdd
Important
PR
BranchMerge
PR
BugFix
PR
Documentation
PR
FeatureAddition
PR
Miscellaneous
PR
Mixed
PR
New
PR
Tests
PR
Update
Roadmap
Stale
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference: StarOpenSource/Engine#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature description
It may be a good idea to redirect the
System.out
andSystem.err
PrintStream
s toLogger#info()
andLogger#error()
respectively, for applications and libraries using standard streams for logging. This would also allow for using the replacedPrintStream
for specific purposes (example: GLFW error callbacks acceptPrintStream
s).Feature implementation
Replacing
System.out
andSystem.err
PrintStream
s.Feature alternatives
No response
Maybe it's not the best idea to replace
System.out
andSystem.err
, as internal engine logic depends on them. This would require code changes not only in the logging infrastructure but in all places where the standard streams are used. Implementing this FR would require creating a constant with a reference to the originalPrintStream
s.However, even though the full FR will likely not get implemented, offering
PrintStream
s which redirect log messages to our own logger implementation sounds interesting. Just not doing that globally, for the entire JVM, is a good idea.