Class DefaultLog
- All Implemented Interfaces:
Log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a child logger whose name is derived from this logger's name by appending a dot and the given suffix.voiddebug(CharSequence content) Sends a message to the user in the debug error level.voiddebug(CharSequence content, Throwable error) Sends a message (and accompanying exception) to the user in the debug error level.voidSends an exception to the user in the debug error level.voidvoidvoiderror(CharSequence content) Sends a message to the user in the error error level.voiderror(CharSequence content, Throwable error) Sends a message (and accompanying exception) to the user in the error error level.voidSends an exception to the user in the error error level.voidvoidvoidinfo(CharSequence content) Sends a message to the user in the info error level.voidinfo(CharSequence content, Throwable error) Sends a message (and accompanying exception) to the user in the info error level.voidSends an exception to the user in the info error level.voidvoidbooleanReturns true if the debug error level is enabled.booleanReturns true if the error error level is enabled.booleanReturns true if the info error level is enabled.booleanReturns true if the trace error level is enabled.booleanReturns true if the warn error level is enabled.voidtrace(CharSequence content) Sends a message to the user in the trace error level.voidtrace(CharSequence content, Throwable error) Sends a message (and accompanying exception) to the user at the trace error level.voidSends an exception to the user in the trace error level.voidSends a lazily-computed message in the trace error level.voidSends a lazily-computed message (and accompanying exception) in the trace error level.voidwarn(CharSequence content) Sends a message to the user in the warn error level.voidwarn(CharSequence content, Throwable error) Sends a message (and accompanying exception) to the user in the warn error level.voidSends an exception to the user in the warn error level.voidvoid
-
Constructor Details
-
DefaultLog
public DefaultLog(org.slf4j.Logger logger)
-
-
Method Details
-
isTraceEnabled
public boolean isTraceEnabled()Description copied from interface:LogReturns true if the trace error level is enabled.The default implementation returns
falsefor backward compatibility with existingLogimplementations.- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if the trace error level is enabled
-
trace
Description copied from interface:LogSends a message to the user in the trace error level.Trace is the most verbose level, intended for Maven core internals such as resolver negotiation, model interpolation, and lifecycle ordering details. Use
Log.debug(CharSequence)instead for messages that help users investigate their build (e.g. why a module was recompiled).The default implementation is a no-op for backward compatibility.
-
trace
Description copied from interface:LogSends a message (and accompanying exception) to the user at the trace error level. The error's stacktrace will be output when this error level is enabled.The default implementation is a no-op for backward compatibility.
-
trace
Description copied from interface:LogSends an exception to the user in the trace error level. The stack trace for this exception will be output when this error level is enabled.The default implementation is a no-op for backward compatibility.
-
trace
Description copied from interface:LogSends a lazily-computed message in the trace error level. The supplier is only evaluated if trace is enabled.The default implementation is a no-op for backward compatibility.
-
trace
Description copied from interface:LogSends a lazily-computed message (and accompanying exception) in the trace error level. The supplier is only evaluated if trace is enabled.The default implementation is a no-op for backward compatibility.
-
debug
Description copied from interface:LogSends a message to the user in the debug error level.Debug is intended for messages that help users investigate their build — for example, why a module was recompiled or what classpath was resolved. For Maven core internals, use
Log.trace(CharSequence)instead. -
debug
Description copied from interface:LogSends a message (and accompanying exception) to the user in the debug error level. The error's stacktrace will be output when this error level is enabled. -
debug
Description copied from interface:LogSends an exception to the user in the debug error level. The stack trace for this exception will be output when this error level is enabled. -
debug
-
debug
-
info
Description copied from interface:LogSends a message to the user in the info error level. -
info
Description copied from interface:LogSends a message (and accompanying exception) to the user in the info error level. The error's stacktrace will be output when this error level is enabled. -
info
-
info
-
info
-
warn
Description copied from interface:LogSends a message to the user in the warn error level. -
warn
Description copied from interface:LogSends a message (and accompanying exception) to the user in the warn error level. The error's stacktrace will be output when this error level is enabled. -
warn
-
warn
-
warn
-
error
Description copied from interface:LogSends a message to the user in the error error level. -
error
Description copied from interface:LogSends a message (and accompanying exception) to the user in the error error level. The error's stacktrace will be output when this error level is enabled. -
error
Description copied from interface:LogSends an exception to the user in the error error level. The stack trace for this exception will be output when this error level is enabled. -
error
-
error
-
isDebugEnabled
public boolean isDebugEnabled()Description copied from interface:LogReturns true if the debug error level is enabled.- Specified by:
isDebugEnabledin interfaceLog- Returns:
- true if the debug error level is enabled
-
isInfoEnabled
public boolean isInfoEnabled()Description copied from interface:LogReturns true if the info error level is enabled.- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if the info error level is enabled
-
isWarnEnabled
public boolean isWarnEnabled()Description copied from interface:LogReturns true if the warn error level is enabled.- Specified by:
isWarnEnabledin interfaceLog- Returns:
- true if the warn error level is enabled
-
isErrorEnabled
public boolean isErrorEnabled()Description copied from interface:LogReturns true if the error error level is enabled.- Specified by:
isErrorEnabledin interfaceLog- Returns:
- true if the error error level is enabled
-
child
Description copied from interface:LogReturns a child logger whose name is derived from this logger's name by appending a dot and the given suffix.For example, if a plugin's logger is named
"org.apache.maven.plugins.compiler.CompilerMojo", thenchild("diagnostics")returns a logger named"org.apache.maven.plugins.compiler.CompilerMojo.diagnostics". This lets sub-components log under an independently filterable name without requiring a separate injection point.The default implementation returns
this, so existingLogimplementations continue to work without changes. Implementations that wrap a hierarchical logging backend (such as SLF4J) should override this to create a real child logger.
-