logback-extensions
logback-extensions copied to clipboard
Fixes errors for missing file URLs for spring configuration locations
This fixes issue #39. I had to tweak the build a bit to get it to accept a different name on the copyright header, if there's a better approach to that then let me know.
These tests are just ensuring that the WebLogbackConfigurer doesn't throw an exception when provided with missing URLs and instead falls back to the default logging configuration.
I guess that we can stick an assertTrue() at the end of these to show that the test was successful. A stronger test would be to ensure that the default logging initialization occurred, but I don't know how to do that. Even if we could do the test it would be fragile if a developer specified their own logging configuration via a system property or a configuration file.
OK, after a little thought and poking at Spring's MockServletContext
I realized that it wasn't too difficult to test out the error messages for missing configurations. A user who has specified their own logging configuration may still break the test, but it's less likely now.
I tried rebasing this onto master, but it did not compile (symbol not found, bad @Override
, etc.). Can you please rebase? See wip/pr40.
I'd totally forgotten about this one. Anyways, sure, I'll take a look by next week.