Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Excerpt

For advanced users, some tweakable bits for those who like to flip switches.

Table of Contents
maxLevel2
minLevel1

Logging Configuration

GMaven uses SLF4j and uses the Gossip provider to allow for simple and flexible configuration of logging output.

Since version 1.0-rc-3, GMaven provides some default profiles to enable more logging for GMaven components.

To enable DEBUG logging for GMaven:

No Format
mvn -Dgmaven.logging=DEBUG

To enable TRACE logging for GMaven:

No Format
mvn -Dgmaven.logging=TRACE

Custom Logging Configuration

By default Gossip will use a reasonable default configuration. But if you feel like Maven is not spitting out enough information, or want to target the information displayed.

Try creating a $HOME/.gossip/config.properties file something like this:

No Format
version=1.0

profiles=mojo-debug

##
## org.codehaus.mojo.logging=DEBUG
##

profile.mojo-debug.triggers=default

profile.mojo-debug.trigger.default=org.codehaus.groovy.maven.gossip.model.trigger.SystemPropertyTrigger
profile.mojo-debug.trigger.default.name=org.codehaus.mojo.logging
profile.mojo-debug.trigger.default.value=DEBUG
profile.mojo-debug.trigger.default.ignoreCase=true

profile.mojo-debug.filters=console

profile.mojo-debug.filter.console=org.codehaus.groovy.maven.gossip.model.filter.ConsoleWriter
profile.mojo-debug.filter.console.renderer=org.codehaus.groovy.maven.gossip.model.render.SimpleRenderer
profile.mojo-debug.filter.console.renderer.includeName=true
profile.mojo-debug.filter.console.renderer.shortName=true
profile.mojo-debug.filter.console.renderer.nameWidth=30

profile.mojo-debug.logger.org.codehaus.mojo=DEBUG

This example will enable DEBUG logging for Gossip enabled Mojo plugins when the org.codehaus.mojo.logging property is set to DEBUG.

No Format
mvn groovy:providers -Dorg.codehaus.mojo.logging=DEBUG

Internal Logging Configuration

Sometimes you might need to see how the Gossip SLF4J provider is getting configured. To show Gossip's internal logging configure the org.codehaus.groovy.maven.gossip.InternalLogger system property, as in:

No Format
mvn groovy:providers -Dorg.codehaus.groovy.maven.gossip.InternalLogger.level=TRACE