-
Notifications
You must be signed in to change notification settings - Fork 40.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.3.0.M2 : Logback appender runtime errors now block the application startup #3503
Comments
Hey, this is on purpose, please check the release notes |
Precision : the logback file is correct and is not malformed. It's the appender that fails. So the impact is a bit wider that what is explained in the release notes, isn't it ? |
I am not sure. Isn't it failing anyway? Or are you saying it's a temporary glitch? |
The logger is failing to start, but is properly configured and declared in the logback configuration file. It is a poor design of this custom logger that can fail if a remote log repository (flume in this case) is not up. This logger should be corrected / improved of course, but I'm a bit surprised that a legit, well-formed logback configuration file can lead to an application startup crash. From what I see in the catch (Exception ex) {
throw new IllegalStateException("Could not initialize Logback logging from "
+ location, ex);
} part but isn't the if (errors.length() > 0) {
throw new IllegalStateException("Logback configuration error "
+ "detected: \n" + errors);
} part a bit too hard ? |
By too hard I mean : isn't the |
I don't think it's too hard. All that the first catch block verifies is that the XML is legal. The second checks that the configuration actually makes sense from Logback's perspective. It will, for example, catch a typo in the class name of an appender. The intention is to guarantee, as far as we can, that if your app has started then it will produce the expected logging. The specific error that you're seeing looks very similar to #3472 (in both cases the problem occurs beneath |
Indeed using the And OK for the design choice. I might have to adapt to that but I can understand the reason for it. |
Hello,
Upgrading from 1.3.0.M1 to 1.3.0.M2, I've seen that a logback configuration error now block the application startup whereas it had no impact on the startup previously.
Is this a design change or a side effect of the logback extensions integration ?
Example (the Timer already cancelled comes from a custom appender that fails) :
The text was updated successfully, but these errors were encountered: