From: Marco Zanon Date: Tue, 2 Aug 2022 16:47:16 +0000 (+0000) Subject: Modified appendMessage() methods to return a boolean. X-Git-Tag: SVN-to-Git~32 X-Git-Url: https://gitweb.marcozanon.com/?a=commitdiff_plain;h=49580367772e69ce413ab65d8c95014dcc3eebab;p=Macaco Modified appendMessage() methods to return a boolean. --- 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 {