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

Send ScalaNativeWorker logging to stderr #4418

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mill.scalanativelib.worker

import java.io.File
import java.lang.System.{err, out}
import java.lang.System.err

import mill.scalanativelib.worker.api._
import scala.scalanative.util.Scope
Expand Down Expand Up @@ -29,9 +29,9 @@ class ScalaNativeWorkerImpl extends mill.scalanativelib.worker.api.ScalaNativeWo
def logger(level: NativeLogLevel): Logger =
Logger(
traceFn = msg => if (level.value >= NativeLogLevel.Trace.value) err.println(s"[trace] $msg"),
debugFn = msg => if (level.value >= NativeLogLevel.Debug.value) out.println(s"[debug] $msg"),
infoFn = msg => if (level.value >= NativeLogLevel.Info.value) out.println(s"[info] $msg"),
warnFn = msg => if (level.value >= NativeLogLevel.Warn.value) out.println(s"[warn] $msg"),
debugFn = msg => if (level.value >= NativeLogLevel.Debug.value) err.println(s"[debug] $msg"),
infoFn = msg => if (level.value >= NativeLogLevel.Info.value) err.println(s"[info] $msg"),
warnFn = msg => if (level.value >= NativeLogLevel.Warn.value) err.println(s"[warn] $msg"),
errorFn = msg => if (level.value >= NativeLogLevel.Error.value) err.println(s"[error] $msg")
)

Expand Down
Loading