How to clean Julia logs

How can I get clean logs? I want to hide compiling messages and make them use my log formatter not bypass it.

Expected:

  conf |         config {now: Date("2026-08-17")}
  opti |         fit started

Actual:

  conf |         config {now: Date("2026-08-17")}
Info Given DB was explicitly requested, output will be shown live
Precompiling DB finished.
  1 dependency successfully precompiled in 7 seconds
  1 dependency had output during precompilation:
┌ DB
│  [Output was shown above]
└
Info Given Options was explicitly requested, output will be shown live
Precompiling Options finished.
  1 dependency successfully precompiled in 8 seconds
  1 dependency had output during precompilation:
┌ Options
│  [Output was shown above]
└
Info Given SV_JLs was explicitly requested, output will be shown live
Precompiling SV_JLs finished.
  1 dependency successfully precompiled in 7 seconds
  1 dependency had output during precompilation:
┌ SV_JLs
│  [Output was shown above]
└
  opti |         fit started

AFAIK, this output doesn’t go through the logging mechanism at all, it writes directly to stdout/stderr. You can try Base.Precompilation.precompilepkgs(io=devnull) (Julia 1.11+ or so). This function is not exported/public though.

Do you have some kind of deployment workflow? I’d add a precompile step there and then start a clean production process. That’s the way I got rid of the noise in the system journal.

Thanks. Deployment is secondary, I want clean logs during development, without bunch of nonsense about compilation start and end.

Idea to log compilation progress is really strange - it - it’s like julia is extremely slow on startup, so to soften it a bit - you can enjoy reading compiler telling you what its doing while you are waiting…

And not even allowing to format or disable it…

stderr is a shared resource so if you want a private place where only your logs go you should set up a file logger for that.

Hmm, maybe I miss something, why I need to redirect my logs to file if I can just read it in console?

I just mean that you can’t really “ban” people/packages/etc from stderr.

Is there maybe a way to alter julia core language files to make those logs disappear?