From 49580367772e69ce413ab65d8c95014dcc3eebab Mon Sep 17 00:00:00 2001 From: Marco Zanon Date: Tue, 2 Aug 2022 16:47:16 +0000 Subject: [PATCH] Modified appendMessage() methods to return a boolean. --- .../java/com/marcozanon/macaco/logging/MLogFilter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/7.x/src/main/java/com/marcozanon/macaco/logging/MLogFilter.java b/7.x/src/main/java/com/marcozanon/macaco/logging/MLogFilter.java index c5bfcca..353ec98 100644 --- a/7.x/src/main/java/com/marcozanon/macaco/logging/MLogFilter.java +++ b/7.x/src/main/java/com/marcozanon/macaco/logging/MLogFilter.java @@ -90,17 +90,17 @@ public class MLogFilter extends MObject { return this.pausedState; } - public void appendMessage(MLogFilter.Threshold level, String message) throws MLoggingException { - this.appendMessage(level, message, 0); + public boolean appendMessage(MLogFilter.Threshold level, String message) throws MLoggingException { + return this.appendMessage(level, message, 0); } - public void appendMessage(MLogFilter.Threshold level, String message, int indentation) throws MLoggingException { + public boolean appendMessage(MLogFilter.Threshold level, String message, int indentation) throws MLoggingException { if (null == level) { throw new IllegalArgumentException("Invalid 'level': null."); } // if (level.ordinal() > this.getThreshold().ordinal()) { - return; + return false; } // this.logMessageQueue.add(new MLogMessage(message, indentation)); @@ -108,6 +108,8 @@ public class MLogFilter extends MObject { if (!this.getPausedState()) { this.flushMessages(); } + // + return true; } protected void flushMessages() throws MLoggingException { -- 2.30.2