Class ProjectBuildLogAppender
java.lang.Object
org.apache.maven.logging.ProjectBuildLogAppender
- All Implemented Interfaces:
AutoCloseable
Forwards log messages to the client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidclose()static Stringstatic Stringstatic voidsetForkingMojoId(String forkingMojoId) Saves or clears the mojo ID of the forking mojo, so it can be restored when the fork completes.static voidsetForkingProjectId(String forkingProjectId) static voidSets or clears the mojo execution identifier in both the thread-local and the SLF4J MDC.static voidsetProjectId(String projectId) static void
-
Constructor Details
-
ProjectBuildLogAppender
-
-
Method Details
-
getProjectId
-
setProjectId
-
getMojoId
-
setMojoId
Sets or clears the mojo execution identifier in both the thread-local and the SLF4J MDC. When clearing (null), if a forking mojo ID was saved, it is restored — mirroring the fork-aware project ID pattern.Format:
"prefix:goal@executionId"(e.g."compiler:compile@default-compile").- Parameters:
mojoId- the mojo identifier, ornullto clear
-
setForkingProjectId
-
setForkingMojoId
Saves or clears the mojo ID of the forking mojo, so it can be restored when the fork completes. Mirrors thesetForkingProjectId(String)pattern for project IDs.- Parameters:
forkingMojoId- the forking mojo identifier, ornullto clear
-
updateMdc
public static void updateMdc() -
accept
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-