-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Spring Boot 3.2.0.: Bad resolving LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN in Tomcat 10.1 with multiple applications #43306
Comments
This sounds very similar to #24835 so perhaps there's been a regression somewhere since that fix was made. Spring Boot 3.2.0 is no longer supported. Please upgrade to a supported version (3.3.6 or 3.4.0 at the time of writing). If the problem persists and you would like us to investigate further, please provide a complete yet minimal example that reproduces the problem and we can take another look. |
I upgraded both applications to When multiple applications share a JVM, Bwt, it's odd the fact that It is very difficult to provide an example, as the code I provided is simplified from two big Spring Boot projects. |
Btw, upgrading from |
Two minimal war applications, created using https://start.spring.io, with just enough configuration to reproduce the problem when deployed to Tomcat would suffice.
Sorry to hear that. If there's anything in particular that tripped you up and think should have been covered in the release notes, please open a new issue with some details and we can take a look. |
Well, dependencies inside pom.xml were troublesome when upgrading Spring Boot. But, I managed. |
These are the relevant Catalina log lines:
It's obvious that |
Unfortunately, I can't reproduce the behavior that you've described using the information that you've provided thus far. I have two Spring Boot 3.3.6 apps,
And
I've started Tomcat with
It chooses to deploy app
And the eqivalent log lines for app
There's no sign of app one picking up configuration for the already-deployed app two. Unfortunately, we won't be able to spend any more time on this one without a minimal sample that reproduces the problem. |
In my case, I concluded that all of My projects are too complex to be simplified for analysis, I'll investigate further. UPDATE: Removing |
When resolving LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN in
Tomcat 10.1
with multiple applications,Spring Boot 3.2.0
withLogback 1.4.14
gets${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN}
value from a first application, and reuses it in others, making other applications save *.gz files with wrong location and application name.org/springframework/boot/logging/logback/file-appender.xml
Application 1:
Application 2:
Application 2 *.gz files get stored under the location and name prefix of Application 1. Application 2 *.gz files are never created in the dedicated location and name, obviously resolving
file-name-pattern
of wrong application as${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN}
value.Result:
/tmp/app2
-rw-r----- 1 tomcat tomcat 16855 Nov 27 14:24 app2.log
/tmp/app1
Change
logback-spring.xml
:into:
and log file rolling policy executes ok.
Result:
/tmp/app2
/tmp/app1
The text was updated successfully, but these errors were encountered: