public class LoggingHandlerEnvironmentFacet extends AbstractLogAwareFacet
Modifier and Type | Field and Description |
---|---|
static String[] |
DEFAULT_LOGGER_NAMES
Standard logger names/categories for the java.util.Logger.
|
log
Constructor and Description |
---|
LoggingHandlerEnvironmentFacet(String logPrefix,
org.apache.maven.plugin.logging.Log mavenLog,
String encoding,
String[] loggerNamePrefixes)
Creates a new JavaLoggingEnvironment, using the supplied variables to set up a MavenLogHandler.
|
Modifier and Type | Method and Description |
---|---|
static LoggingHandlerEnvironmentFacet |
create(org.apache.maven.plugin.logging.Log mavenLog,
Class<? extends AbstractJaxbMojo> caller,
String encoding)
Factory method creating a new LoggingHandlerEnvironmentFacet wrapping the supplied properties.
|
void |
restore()
Restores the original root Logger state, including Level and Handlers.
|
void |
setup()
Sets up this Environment, inferring temporary changes to environment variables or conditions.
|
public static final String[] DEFAULT_LOGGER_NAMES
public LoggingHandlerEnvironmentFacet(String logPrefix, org.apache.maven.plugin.logging.Log mavenLog, String encoding, String[] loggerNamePrefixes)
logPrefix
- The prefix to use for the logger, indicating which tool is used by the log. Example: "XJC"
or "SchemaGen".mavenLog
- The active Maven Log.encoding
- The configured encoding.loggerNamePrefixes
- The prefixes of the Logger names to be permitted logging.public void setup()
restore()
method.
Redirects JUL logging statements to the Maven Log.
public void restore()
public static LoggingHandlerEnvironmentFacet create(org.apache.maven.plugin.logging.Log mavenLog, Class<? extends AbstractJaxbMojo> caller, String encoding)
mavenLog
- The active Maven Log.caller
- The AbstractJaxbMojo subclass which invoked this LoggingHandlerEnvironmentFacet factory method.encoding
- The encoding used by the Maven Mojo subclass.Copyright © 2005–2015 MojoHaus. All rights reserved.