Skip to content
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

Log file rotation for periods longer then day not working. Regression. #40016

Closed
alex-pumpkin opened this issue Apr 11, 2024 · 7 comments · Fixed by #40405
Closed

Log file rotation for periods longer then day not working. Regression. #40016

alex-pumpkin opened this issue Apr 11, 2024 · 7 comments · Fixed by #40405
Labels
area/logging kind/bug Something isn't working
Milestone

Comments

@alex-pumpkin
Copy link
Contributor

Describe the bug

Since 3.4.x it is not possible to use logging file rotation periods longer then a day, for example quarkus.log.file.rotation.file-suffix=.yyyy-MM. Application doesn't start.

Expected behavior

Application starts successfully

Actual behavior

2024-04-11 14:29:17,108 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile [dev]): java.lang.RuntimeException: Failed to start quarkus
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
        at io.quarkus.runner.GeneratedMain.main(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:113)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unit is too large to be used for truncation
        at java.base/java.time.LocalTime.truncatedTo(LocalTime.java:978)
        at java.base/java.time.LocalDateTime.truncatedTo(LocalDateTime.java:1118)
        at java.base/java.time.ZonedDateTime.truncatedTo(ZonedDateTime.java:1527)
        at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.calcNextRollover(PeriodicRotatingFileHandler.java:254)
        at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setSuffix(PeriodicRotatingFileHandler.java:197)
        at io.quarkus.runtime.logging.LoggingSetupRecorder.configureFileHandler(LoggingSetupRecorder.java:602)
        at io.quarkus.runtime.logging.LoggingSetupRecorder.initializeLogging(LoggingSetupRecorder.java:173)
        at io.quarkus.deployment.steps.LoggingResourceProcessor$setupLoggingRuntimeInit2024815463.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.LoggingResourceProcessor$setupLoggingRuntimeInit2024815463.deploy(Unknown Source)
        ... 13 more

How to Reproduce?

  1. Download or clone getting-started example
  2. Modify application.properties, add
    quarkus.log.file.enable=true
    quarkus.log.file.rotation.file-suffix=.yyyy-MM
    
  3. run ./mvnw compile quarkus:dev

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

The solution is quite simple. There is a PR to fix it. But it should be integrated to Quarkus after releasing new version of jboss-logmanager

@alex-pumpkin alex-pumpkin added the kind/bug Something isn't working label Apr 11, 2024
@alex-pumpkin alex-pumpkin changed the title Log file rotation for periods longer then day. Regression. Log file rotation for periods longer then day not working. Regression. Apr 11, 2024
Copy link

quarkus-bot bot commented Apr 11, 2024

/cc @dmlloyd (logging)

@geoand
Copy link
Contributor

geoand commented Apr 11, 2024

@jamezp @dmlloyd is this now the expected behavior?

@jamezp
Copy link
Contributor

jamezp commented Apr 11, 2024

No, that should still work and if it doesn't it's a bug. I can't look right now as I'm in the middle of something else, but I can likely look later today or tomorrow.

@geoand
Copy link
Contributor

geoand commented Apr 11, 2024

🙏🏼

@alex-pumpkin
Copy link
Contributor Author

Actually there is a pull request to fix it jboss-logging/jboss-logmanager#468

Please take a look when it's convenient for you @jamezp

@jamezp
Copy link
Contributor

jamezp commented Apr 24, 2024

I did a 3.0.5.Final release today which includes this fix and dependabot should pick it up.

@jamezp
Copy link
Contributor

jamezp commented Apr 24, 2024

Well, crap. I missed this commit when creating the branch I guess... ...3.0.6.Final incoming. Sorry for the noise, it was the generate release notes that were wrong.

@quarkus-bot quarkus-bot bot added this to the 3.11 - main milestone May 2, 2024
@gsmet gsmet modified the milestones: 3.11 - main, 3.10.1 May 10, 2024
@gsmet gsmet modified the milestones: 3.10.1, 3.8.6 Aug 7, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 25, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 25, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 25, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 27, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 27, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 27, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 28, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 28, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 28, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 28, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 28, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 30, 2024
gtroitsk added a commit to gtroitsk/quarkus-test-suite that referenced this issue Aug 30, 2024
fedinskiy pushed a commit to quarkus-qe/quarkus-test-suite that referenced this issue Aug 30, 2024
jedla97 pushed a commit to quarkus-qe/quarkus-test-suite that referenced this issue Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants