Package org.apache.maven.api.cli
Interface Logger
- All Known Implementing Classes:
ProtoLogger
Defines a simple logging interface for Maven CLI operations.
This interface provides methods for logging messages at different severity levels
and supports logging with or without associated exceptions.
- Since:
- 4.0.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents the severity levels for log messages. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
Logs a debug message without an associated exception.default void
Logs a debug message with an associated exception.default void
Logs an error message without an associated exception.default void
Logs an error message with an associated exception.default void
Logs an info message without an associated exception.default void
Logs an info message with an associated exception.default void
log
(Logger.Level level, String message) Logs a message at the specified level without an associated exception.void
log
(Logger.Level level, String message, Throwable error) Logs a message at the specified level with an associated exception.default void
Logs a warning message without an associated exception.default void
Logs a warning message with an associated exception.
-
Method Details
-
log
Logs a message at the specified level without an associated exception.- Parameters:
level
- the severity level of the messagemessage
- the message to be logged
-
log
Logs a message at the specified level with an associated exception.- Parameters:
level
- the severity level of the messagemessage
- the message to be loggederror
- the associated exception, or null if not applicable
-
debug
Logs a debug message without an associated exception.- Parameters:
message
- the debug message to be logged
-
debug
Logs a debug message with an associated exception.- Parameters:
message
- the debug message to be loggederror
- the associated exception
-
info
Logs an info message without an associated exception.- Parameters:
message
- the info message to be logged
-
info
Logs an info message with an associated exception.- Parameters:
message
- the info message to be loggederror
- the associated exception
-
warn
Logs a warning message without an associated exception.- Parameters:
message
- the warning message to be logged
-
warn
Logs a warning message with an associated exception.- Parameters:
message
- the warning message to be loggederror
- the associated exception
-
error
Logs an error message without an associated exception.- Parameters:
message
- the error message to be logged
-
error
Logs an error message with an associated exception.- Parameters:
message
- the error message to be loggederror
- the associated exception
-