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

优雅停机ShutdownHandler中绑死了logback日志 #461

Closed
wenjingliang opened this issue Jul 19, 2018 · 0 comments
Closed

优雅停机ShutdownHandler中绑死了logback日志 #461

wenjingliang opened this issue Jul 19, 2018 · 0 comments

Comments

@wenjingliang
Copy link

private void exit() {
	LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
	loggerContext.stop();

	try {
		Thread.sleep(3000);
	} catch (InterruptedException e) {
		e.printStackTrace(); // NOSONAR
		Thread.currentThread().interrupt();
	}

	System.exit(-1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants