Details
-
Improvement
-
Resolution: Won't Fix
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
enhancement
-
P3
-
110
Description
On my last project I was irritated by legacy and poorly written code writing to System.out and System.err, including some third party libraries that I could not alter. So I thought I'd write a bridge between System.out and System.err and SLF4J so that I would be able to turn them on and off. Here it is.
I've tried to handle the problem of recursion and allowing logging packages to still write to the Console. I've also supplied a ServletContextListener to make it simple to set up in a web application.
There is probably more that can be done around preventing recursion disasters - possibly throwing an Error? I would also like to explore using the marker I have attached to stack trace events to suppress the pattern other than the message itself.