Skip to content

#94 Enable slf4j-simple timestamps for Maven logs#909

Open
idrisoffrinat-cpu wants to merge 1 commit intoobjectionary:masterfrom
idrisoffrinat-cpu:fix-94-maven-log-timestamps
Open

#94 Enable slf4j-simple timestamps for Maven logs#909
idrisoffrinat-cpu wants to merge 1 commit intoobjectionary:masterfrom
idrisoffrinat-cpu:fix-94-maven-log-timestamps

Conversation

@idrisoffrinat-cpu
Copy link
Copy Markdown

Summary

Closes #94.

Since Maven 3.1.x the distribution ships with slf4j-simple as the active SLF4J implementation, which ignores the log4j configuration applied by eo-maven-plugin. As a result, eoc output lacks per-line timestamps even though log4j formatting already sets them up.

Passing the slf4j-simple system properties directly to every mvnw invocation makes the active logger emit timestamps in the yyyy-MM-dd HH:mm:ss format, matching the approach suggested in the issue.

Changes

  • src/mvnw.js: append -Dorg.slf4j.simpleLogger.showDateTime=true and -Dorg.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss to every mvnw command in the shared params builder.

Test plan

  • npx mocha test/test_mvnw.js — all 3 tests pass, and debug output confirms the flags are included in the constructed Maven command.
  • npx eslint src/mvnw.js — clean.

🤖 Generated with Claude Code

Since Maven 3.1.x the distribution ships with slf4j-simple, which ignores
the log4j configuration used by eo-maven-plugin. Pass the slf4j-simple
system properties directly to every mvnw invocation so that timestamps
appear in build logs, matching the format already used by log4j.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yegor256
Copy link
Copy Markdown
Member

yegor256 commented May 6, 2026

@volodya-lombrozo please, take a look

@yegor256 yegor256 requested a review from volodya-lombrozo May 6, 2026 13:30
Copy link
Copy Markdown
Member

@volodya-lombrozo volodya-lombrozo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@idrisoffrinat-cpu great thanks for the contribution! Could you please add some tests that would prove the solution works?

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

Successfully merging this pull request may close these issues.

Add timestamps for maven logs

4 participants