Log4j has the ability to filter log levels by subject matter for twenty years. In Java you end up having to use that a lot for this reason.

Logging in rust also does that, you can set logging levels for individual modules deep within your dependency tree.

Oh that library that gives you a write() wrapper in exchange for RCE vulns

Log4j is basically a design pattern. If you don’t like the library, Slf4j/logback are based on the same principles.