[
https://issues.apache.org/jira/browse/MENFORCER-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17740497#comment-17740497
]
ASF GitHub Bot commented on MENFORCER-488:
------------------------------------------
kwin commented on PR #279:
URL: https://github.com/apache/maven-enforcer/pull/279#issuecomment-1623254717
> one missing `isWarnOrErrorEnabled`
I would prefer to leave that out, as the semantics is not clear from the
name. It could mean both
1. `isWarnEnabled() || isErrorEnabled()` or
2. `isWarnEnabled() && rule.getLevel() == EnforcerLevel.WARN ||
isErrorEnabled() && rule.getLevel() == EnforcerLevel.ERROR`
Although one could clarify that in the javadoc the chance for
misinterpretation is quite high and I would not add it until we see a real use
case.
> EnforcerLogger: Provide isDebugEnabled()
> ----------------------------------------
>
> Key: MENFORCER-488
> URL: https://issues.apache.org/jira/browse/MENFORCER-488
> Project: Maven Enforcer Plugin
> Issue Type: Improvement
> Components: Rule API
> Reporter: Konrad Windszus
> Assignee: Konrad Windszus
> Priority: Major
>
> Similar to what SLF4J Logger
> (https://www.slf4j.org/api/org/slf4j/Logger.html) and
> {{org.apache.maven.plugin.logging.Log}} provide, there should be a method to
> determine if a certain log level is enabled. This is useful to put a guard
> around costly evaluation methods which are only ever useful once a certain
> level is active.
> As switching log level is mostly done via -X command line a
> {{isDebugEnabled}} should be sufficient though for most of the cases.
> Using the supplier parameter does not always help e.g. when multiple debug
> outputs should be surrounded by the same guard.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)