zio / zio-logging

Powerful logging for ZIO 2.0 applications, with compatibility with many logging backends out-of-the-box.
https://zio.dev/zio-logging/
Apache License 2.0
173 stars 81 forks source link

JUL bridge generates a lot of unnecessary data #876

Open andrzejressel opened 2 weeks ago

andrzejressel commented 2 weeks ago

Currently due to ".level = ALL" in Jul config all logs go to zio. I was expecting some kind of overhead, but not too much. When profiling my JAXB app, 20% of deserialization time and 90% of memory usage is wasted due to pushing FINEST level logs.

I guess current api has to be deprecated and every method should also have parameter with JUL config.

justcoon commented 2 weeks ago

hi @andrzejressel this seems to be similar problem like https://github.com/zio/zio-logging/issues/809, which was solved with https://github.com/zio/zio-logging/pull/810, and also jul-bridge have similar support

so if this is something like that, than it should be possible to set LogFilter for jul-bridge as mentioned in docs

andrzejressel commented 2 weeks ago

Yeah, that seems to fix the issue. I think I will deprecate initialize and add note about finest level.