Skip to content

Commit

Permalink
Merge pull request #488 from kalaiyarasiganeshalingam/master
Browse files Browse the repository at this point in the history
Update the implementation for disabling quartz logs
  • Loading branch information
kalaiyarasiganeshalingam authored Aug 29, 2023
2 parents 8faaba9 + 685d24d commit 4cc2545
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
*/
public class TaskActions {

private static int bound = 1000000;
private static String value = "1000";
private static PrintStream console = System.err;
private static final int bound = 1000000;
private static final String value = "1000";
private static final PrintStream console = System.err;

static {
Utils.disableQuartzLogs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public class TaskConstants {
public static final String LOG_AND_CONTINUE = "LOG_AND_CONTINUE";
public static final String TERMINATE = "TERMINATE";
public static final String WAIT = "WAIT";
public static final String QUARTZ_CLASS_NAME = "org.quartz";
public static final String QUARTZ = "quartz";

public static final BString ERR_POLICY = StringUtils.fromString("errorPolicy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*/
public class Utils {

private static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");

public static BError createTaskError(String message) {
return ErrorCreator.createDistinctError(TaskConstants.ERROR, ModuleUtils.getModule(),
Expand Down Expand Up @@ -149,9 +149,7 @@ public static void printMessage(String msg, PrintStream console) {
}

public static void disableQuartzLogs() {
Logger quartzLogger = Logger.getLogger(TaskConstants.QUARTZ_CLASS_NAME);
quartzLogger.setLevel(Level.OFF);
LogManager.getLogManager().addLogger(quartzLogger);
Logger.getLogger("").setLevel(Level.OFF);
LogManager logManager = LogManager.getLogManager();
Enumeration<String> names = logManager.getLoggerNames();
for (String name : Collections.list(names)) {
Expand Down

0 comments on commit 4cc2545

Please sign in to comment.