public class MavenLogHandler extends Handler
| Constructor and Description |
|---|
MavenLogHandler(org.apache.maven.plugin.logging.Log log,
String prefix,
String encoding,
String[] acceptedLogRecordPrefixes)
Creates a new MavenLogHandler which adapts a Handler to emit log messages onto a Maven Log.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
static Level |
getJavaUtilLoggingLevelFor(org.apache.maven.plugin.logging.Log mavenLog)
Retrieves the JUL Level matching the supplied Maven Log.
|
static Filter |
getLoggingFilter(String... requiredPrefixes)
Retrieves a java.util.Logging filter used to ensure that only LogRecords whose
logger names start with any of the required prefixes are logged.
|
void |
publish(LogRecord record) |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevelpublic MavenLogHandler(org.apache.maven.plugin.logging.Log log,
String prefix,
String encoding,
String[] acceptedLogRecordPrefixes)
log - The Maven Log to emit log messages to.prefix - An optional prefix used to prefix any log message.encoding - The encoding which should be used.acceptedLogRecordPrefixes - A non-null list of prefixes holding LogRecord logger names for
permitted/accepted LogRecords.public void close()
throws SecurityException
close in class HandlerSecurityExceptionpublic static Level getJavaUtilLoggingLevelFor(org.apache.maven.plugin.logging.Log mavenLog)
mavenLog - A non-null Maven Log.public static Filter getLoggingFilter(String... requiredPrefixes)
requiredPrefixes - A non-null list of prefixes to be matched with the LogRecord logger names.Copyright © 2005–2016 MojoHaus. All rights reserved.