You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Björn Raupach <ra...@posteo.de> on 2022/07/17 09:53:37 UTC

MENFORCER-398 | up for grabs

Hello there,

nice meeting all of you. I have a question regarding MENFORCER-398 "show 
rules processed". This is an up-for-grabs issue, so I figured I give it 
a try. I am still unsure where to ask questions. Lets try the mailing 
list :-)

 From the issue description:

   "Would be nice to have the option of showing what rules are processed, 
rather than relying on each rule to output its own success/failure 
message."

Excuse my ignorance, but isn't a change in the log level enough?

With Maven Enforcer Plugin 3.0.0 and setting the Maven Log Level to 
debug I get:

[DEBUG] Executing rule: org.apache.maven.plugins.enforcer.AlwaysPass
[INFO] Always pass!
[DEBUG] Executing rule: org.apache.maven.plugins.enforcer.AlwaysPass
[INFO] Always pass!
[DEBUG] Executing rule: 
org.apache.maven.plugins.enforcer.BannedDependencies

The information what rules are processed is already there. Without a 
code change. I assume most people run Maven with the default log level 
info, so the information gets lost. The log level is too low.

https://github.com/apache/maven-enforcer/blob/7e6f0261ee948ca33504558e4df63621a9bbdecc/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java#L190

Instead of this:

   log.debug( "Executing rule: " + currentRule );

use this

   log.info( "Executing rule: " + currentRule );


kind regards
Bjoern



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: MENFORCER-398 | up for grabs

Posted by Maarten Mulders <mt...@apache.org>.
Hello Björn,

Thanks for reaching out. I think your observations a right, making this 
_really_ an up-for-grabs issue.

Given that most Maven users only enable debug logging for 
troubleshooting purposes, they will usually not see it. So we would 
indeed need a small code change to make the information visible _by 
default_.


Thanks,

Maarten

On 17/07/2022 11:53, Björn Raupach wrote:
> Hello there,
> 
> nice meeting all of you. I have a question regarding MENFORCER-398 "show 
> rules processed". This is an up-for-grabs issue, so I figured I give it 
> a try. I am still unsure where to ask questions. Lets try the mailing 
> list :-)
> 
>  From the issue description:
> 
>    "Would be nice to have the option of showing what rules are 
> processed, rather than relying on each rule to output its own 
> success/failure message."
> 
> Excuse my ignorance, but isn't a change in the log level enough?
> 
> With Maven Enforcer Plugin 3.0.0 and setting the Maven Log Level to 
> debug I get:
> 
> [DEBUG] Executing rule: org.apache.maven.plugins.enforcer.AlwaysPass
> [INFO] Always pass!
> [DEBUG] Executing rule: org.apache.maven.plugins.enforcer.AlwaysPass
> [INFO] Always pass!
> [DEBUG] Executing rule: 
> org.apache.maven.plugins.enforcer.BannedDependencies
> 
> The information what rules are processed is already there. Without a 
> code change. I assume most people run Maven with the default log level 
> info, so the information gets lost. The log level is too low.
> 
> https://github.com/apache/maven-enforcer/blob/7e6f0261ee948ca33504558e4df63621a9bbdecc/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java#L190 
> 
> 
> Instead of this:
> 
>    log.debug( "Executing rule: " + currentRule );
> 
> use this
> 
>    log.info( "Executing rule: " + currentRule );
> 
> 
> kind regards
> Bjoern
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org