Package org.apache.maven.shared.utils.logging
package org.apache.maven.shared.utils.logging
An API to write Maven messages to console with styled color content, consistently across whole
Maven ecosystem (Maven itself or any plugin or extension).
Messages are built with instances of MessageBuilder
which provides a fluent API, while error level are colored by slf4j provider with
LoggerLevelRenderer
.
MessageUtils
gives access to these builders.
Plugins can use this API with any Maven version: color just won't be activated when run with Maven version older than 3.5.0.
Styles are:
debug
,info
,warning
anderror
forlogger level rendering
,success
,warning
,failure
,strong
,mojo
andproject
formessage content
MAVEN_OPTS
environment variable (eventually in .mavenrc
script):- system properties are named
style.<style name>
, - values are comma separated combination of
bold
,<color>
andbg<color>
(for background), where<color>
is an ANSI color:black
,red
,green
,yellow
,blue
,magenta
,cyan
orwhite
, eventually withbright
prefix
- Since:
- 3.1.0
-
ClassDescriptionLogger level renderer, intended for Maven slf4j logging provider implementers to render logger level.Message builder that supports configurable styling.Colored message utils, to manage colors consistently across plugins (only if Maven version is at least 3.5.0).Message builder implementation that just ignores styling, for Maven version earlier than 3.5.0.Configurable message styles.