13
When using sbt with forking (fork in run := true), every output from my application to stdout is prefixed by [info]; output to stderr is prefixed with [error].
This behavior is somewhat annoying when using a Java logging framework which outputs to stderr. The resulting debug messages typically look like this:
[error] [main] INFO MyClass ...
[error] [main] DEBUG MyClass ...
I would like to suppress these prefixes like when running the code without forking. What I tried:
- setting
sbt -Dsbt.log.noformat=truein the sbt launch script. But this only removes colored ANSI output; prefixes are still there just without color - setting
logLevel in run := Level.Errorinbuild.sbt. This does not seem to have any influence on logging with forking.
Is there any way to suppress the prefixes?