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 a default config for logback #3818

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

lefou
Copy link
Member

@lefou lefou commented Oct 23, 2024

Since we bundle the logback dependency, it runs with a built-in default config printing all messages with at least DEBUG level on the console. This can be very verbose.

This change includes a default config creating a log file out/mill.log in the current workind directory. Since Mill now always runs in a sandbox dir, this should not pollute the users working directory.

If a user wants to change the log configuration, she can provide an alternative config with -Dlogback.configurationFile=/path/to/config.xml

We add the config file logback.xml to the runtime resources of the dist module, so it is only on the classpath of the Mill assembly. Since this assembly isn't expected on the classpath of other tools or libraries, we should avoid accidental downstream logging configurations.

Fix #3671

Since we bundle the logback dependency, it runs with a built-in default config printing all messages with at least DEBUG level on the console. This can be very verbose.

This change includes a default config creating a log file `out/mill.log` in the current workind directory. Since Mill server  now always runs in a sandbox dir, this should not polute the users working directory.

If a user is want to change the log configuration, she ca simple provide an alternatve config with `-Dlogback.configurationFile=/path/to/config.xml`
@lefou lefou marked this pull request as ready for review October 23, 2024 07:57
@lefou lefou requested a review from lihaoyi October 23, 2024 08:00
@lefou lefou merged commit cb5a271 into com-lihaoyi:main Oct 23, 2024
24 checks passed
@lefou lefou deleted the logback-config branch October 23, 2024 08:30
@lefou lefou added this to the 0.12.0 milestone Oct 23, 2024
lihaoyi added a commit that referenced this pull request Nov 2, 2024
…ile (#3892)

Since #3818 created a `dist/` sub-folder, we may as well use it. This
removes 300+ lines from the root `build.mill` and should speed up
incremental compiles of the build code
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.

Provide a default logback.xml file directing log output into a file under out/.
2 participants