Repository: logging-log4j2 Updated Branches: refs/heads/master cb4bf9a0d -> eb60049a1
Document that the shutdown method is blocking in LogManager Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/eb60049a Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/eb60049a Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/eb60049a Branch: refs/heads/master Commit: eb60049a1bbea7b90ad6a4e39b91bf7baa84f4c7 Parents: cb4bf9a Author: Mikael Ståldal <[email protected]> Authored: Wed Jan 27 14:26:22 2016 +0100 Committer: Mikael Ståldal <[email protected]> Committed: Wed Jan 27 14:26:22 2016 +0100 ---------------------------------------------------------------------- .../main/java/org/apache/logging/log4j/LogManager.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/eb60049a/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java b/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java index 086a065..8b7f389 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java @@ -288,6 +288,10 @@ public class LogManager { /** * Shutdown using the LoggerContext appropriate for the caller of this method. * This is equivalent to calling {@code LogManager.shutdown(false)}. + * + * This call is synchronous and will block until shut down is complete. + * This may include flushing pending log events over network connections. + * * @since 2.6 */ public static void shutdown() { @@ -297,6 +301,10 @@ public class LogManager { /** * Shutdown the logging system if the logging system supports it. * This is equivalent to calling {@code LogManager.shutdown(LogManager.getContext(currentContext))}. + * + * This call is synchronous and will block until shut down is complete. + * This may include flushing pending log events over network connections. + * * @param currentContext if true a default LoggerContext (may not be the LoggerContext used to create a Logger * for the calling class) will be used. * If false the LoggerContext appropriate for the caller of this method is used. For @@ -311,6 +319,10 @@ public class LogManager { /** * Shutdown the logging system if the logging system supports it. + * + * This call is synchronous and will block until shut down is complete. + * This may include flushing pending log events over network connections. + * * @param context the LoggerContext. * @since 2.6 */
