-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
logback graceful shutdown #8407
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
logback graceful shutdown #8407
Conversation
|
Hi @YuitoSato, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
|
done with signing the CLA. |
…/playframework into 8277_logback_graceful_shutdown
| * These default configs specify only a console logger which outputs only 10 lines of an exception stack trace. | ||
| * Play uses ANSI color codes by default in level messages. | ||
| * For production, the default config puts the console logger behind the logback [AsyncAppender](https://logback.qos.ch/manual/appenders.html#AsyncAppender). For details on the performance implications on this, see this [blog post](https://blog.takipi.com/how-to-instantly-improve-your-java-logging-with-7-logback-tweaks/). | ||
| * In order to guarantee that logged messages have had a chance to be processed by asynchronous appenders (including the TCP appender) and ensure background threads have been stopped, you'll need to cleanly shut down logback when your application exits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good, but we want to have the line explicitly included:
<shutdownHook class="ch.qos.logback.core.hook.DelayingShutdownHook"/>
along with a link to https://logback.qos.ch/manual/configuration.html#shutdownHook and https://jira.qos.ch/browse/LOGBACK-1090
|
Thanks @wsargent. |
* remove apache commons libs (playframework#8455) * remove apache commons libs currently play added a lot of "helper" libraries in the past, however with recent JVM upgrades and more and more stuff inside the JVM itself these got more and more unnecessary. Actually this imports some Classes from apache commons lang3, however only a really small subset of the library is imported. The subset itself barly changed over the recent years and Play mostly used just the reflect stuff of commons lang3 * Remove set current app when allow global false (playframework#8462) * Remove imports to current app * Add missing deprecation notes * Remove invalid scaladoc tags There is no `@deprecated` tag in scaladocs since we have the `@deprecated` annotation. * Do not set current app when global state is disabled * Configure mima filter * Clear warn messages when using global state * Just stop the current app if global state is enabled * logback graceful shutdown (playframework#8407) * add shutdown hook to logback-play-default.xml playframework#8277 * update SettingsLogger.md documentation playframework#8277 * delete an unnecessary line playframework#8277. * add shutdown hook to logback-play-logSql.xml playframework#8277 * add line playframework#8277 * update SettingsLogger.md playframework#8277 * update SettingsLogger.md playframework#8277
|
2.6.x: 3aa4930 |
|
Starting with Play 2.7, adding |
Pull Request Checklist
Helpful things
Fixes
Fixes #8277
Purpose
This PR adds graceful shutdown setting to the default logback which uses AsyncAppender.