Level.ALL deprecation caused us issues #918
-
In theory switching everything in our library files to Level.Trace should have worked. And it did - kind of. We believe (and are going to test)
Is the culprit and changing to
will work. But here's the problem We share common config on a java version basis. So the logback file will be used for all of our java21 usage for example. We don't have different logback.xml for different logback versions. So older logbacks will also change over to this, but the core libraries will still use Level.All I predict a mess, though we'll see in the next few days. Not sure of what can be done Summary:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
I did more investigating. Here is the specific use case.
The current implementation is a bit goofy but has worked until now. Basically the non request log appenders all have a Now I could write my own filter. I did. It is much more sane and it works - basically just checks the class of the logging event. However that would BREAK for older users of our logback file - which is shipped separately. Currently most solutions reaquire us shipping something that
|
Beta Was this translation helpful? Give feedback.
-
The use of Level.ALL in a long statement is totally wrong and should never occur. Trying to keep using Level.ALL is incomprehensible to me. |
Beta Was this translation helpful? Give feedback.
-
Your initial comment seems to assume that there was an initial discussion where some context about the problem was established. However, I cannot seem to find an earlier discussion we may have had. Anyway, I am missing the context here. For example, I cannot imagine a normal setting where the following filter would have any effect:
unless some developer went out of his way to use Level.ALL in a log statement. If so, how did he/she manage to use Level.ALL in a log statement? If this is in a library, which library is this? |
Beta Was this translation helpful? Give feedback.
-
So in our Logging library indeed the developer did this
combined with the logback i posted this ended up basically working this way. The request log ("acccess") was logged only to the appender for access log. All other logging were rejected since there was a filter of Level.All, mismatch=Deny I completely agree this was dumb. And wrote my own simpler filter that simply checks the subclass of the event (eg if its RequestLogEvent). However my issue is backwards compatibolity - this logback filter is shared with a bunch of services that are not yet up to this managed pom version - and hence will not have access to this new filter. So my question to be clear is
|
Beta Was this translation helpful? Give feedback.
-
I cannot think of any solution which would not require writing some custom code. |
Beta Was this translation helpful? Give feedback.
Ok thanks. We'll try to figure out something to dig us out of our tech debt. Thanks for the response and for your great library efforts.