Skip to content

Commit

Permalink
Fix logger parameters order
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Apr 27, 2020
1 parent 9e56111 commit c43c2dc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 the original author or authors.
* Copyright 2018-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -241,15 +241,15 @@ private void overrideExitMethods() {
String exitMsg = "Exit.%s(%d, %s) called";
Exit.setExitProcedure((statusCode, message) -> {
if (logger.isDebugEnabled()) {
logger.debug(new RuntimeException(), String.format(exitMsg, "exit", statusCode, message));
logger.debug(String.format(exitMsg, "exit", statusCode, message), new RuntimeException());
}
else {
logger.warn(String.format(exitMsg, "exit", statusCode, message));
}
});
Exit.setHaltProcedure((statusCode, message) -> {
if (logger.isDebugEnabled()) {
logger.debug(new RuntimeException(), String.format(exitMsg, "halt", statusCode, message));
logger.debug(String.format(exitMsg, "halt", statusCode, message), new RuntimeException());
}
else {
logger.warn(String.format(exitMsg, "halt", statusCode, message));
Expand Down

0 comments on commit c43c2dc

Please sign in to comment.