license-maven-plugin icon indicating copy to clipboard operation
license-maven-plugin copied to clipboard

Don't use getLog().isDebugEnabled() to determine the "verbose" flag

Open digulla opened this issue 5 years ago • 2 comments

The code currently calls getLog().isDebugEnabled() to set the verbose flag.

In the code, I see patterns like these:

  • if (isVerbose()) StringBuilder buffer = ...; log.info(buffer)
  • if (isVerbose()) log.info(details)

This feels like a hack to get logging at a level between INFO and DEBUG.

I suggest to get rid of the "verbose" flag and always log at DEBUG level for these.

For the blocks that prepare a complex string, use log.isDebugEnabled() directly.

digulla avatar Jun 21 '19 08:06 digulla

What would happen with the verbose Mojo parameter?

ppalaga avatar Jun 22 '19 13:06 ppalaga

What would happen with the verbose Mojo parameter?

verbose Mojo parameter can be deprecated.

slawekjaranowski avatar Jun 30 '23 11:06 slawekjaranowski