Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maven module name to the logs #1133

Open
turbanoff opened this issue Feb 13, 2024 · 0 comments
Open

Add maven module name to the logs #1133

turbanoff opened this issue Feb 13, 2024 · 0 comments

Comments

@turbanoff
Copy link

Do you want to request a feature or report a bug?
I want to request small logs improvement

What is the current behavior?
Currently when plugin is in the action - it just redirects output of frontend tools to maven logger as is.
Example from our TeamCity log:

[17:44:43] :	 [Step 3/3]      [exec] <s> [webpack.Progress] 54% building 128/160 entries 910/948 dependencies 134/250 modules
[17:44:43] :	 [Step 3/3]      [exec] <s> [webpack.Progress] 54% building 129/160 entries 919/954 dependencies 137/250 modules
[17:44:43] :	 [Step 3/3]      [exec] <s> [webpack.Progress] 54% building 130/160 entries 919/954 dependencies 137/250 modules
[17:44:43] :	 [Step 3/3]      [exec] <s> [webpack.Progress] 55% building 131/160 entries 919/954 dependencies 137/250 modules

It makes hard to distinguish which log line relates to which maven module. We have multi-module maven project and use parallel build. It means maven log contains logs of different modules mixed up.

What is the expected behavior?
It would be nice to add module name in front of logs. Similar to what we have when we run maven with this option: -Dorg.slf4j.simpleLogger.showThreadName=true.
Example:

[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [INFO] --- flatten-maven-plugin:1.5.0:flatten (flatten) @ frontend ---
[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [INFO] Generating flattened POM of project com.devexperts.xt.webbroker:frontend:pom:MASTER-SNAPSHOT...
[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [INFO] 
[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [INFO] --- kotlin-maven-plugin:1.8.21:compile (compile) @ frontend ---
[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [WARNING] No sources found skipping Kotlin compile
[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [INFO] 
[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [INFO] --- maven-compiler-plugin:3.12.1:compile (java-compile) @ frontend ---
[17:45:02] :	 [Step 3/3] [mvn-builder-frontend] [INFO] No sources to compile

Here we can see build logs from frontend module

Please mention your frontend-maven-plugin and operating system version.
1.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant