WorldWindJava
WorldWindJava copied to clipboard
Consider using SLF4J.
I am currently using WorldWind as part of a larger system. One of the issues that I came across was that WorldWind uses Java's built-in logging framework. This prevents me from consolidating the logs as our system uses a different logging framework. Wouldn't it be better if WorldWind used SLF4J for logging so that we could decide what logging implementation to use at runtime?
You could use the jul-to-slf4j bridge.
Yes. Thanks, I am using that at the moment. It is a bit of a hack though.
SLF4J is great for logging and I've used it in several other projects, and you are right, it seems like it would make a great fit within WorldWind. However, there are two drawbacks.
- World Wind has a history of limiting external dependencies (with exception of the JOGL libraries) in order to simplify SDK utilization for some of our core users (not everyone's development environment is Maven friendly). JUL is convienent in that it doesn't require anything additional.
- Need to maintain backwards compatibility. Yes we could just pipe SLF4J right back into jul but that adds some complexity to the existing SDK.
I'm sorry that World Wind's utilization of the standard Java logging utility creates two different logs for your application but the jul-to-sl4j bridge looks like a good work around. I'll keep this open and see if there is any additional interest.
We use WorldWind in a similar way, and we're also using the jul-to-slf4j bridge.
It would be interesting to have SLF4J in WorldWind though!