You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Christopher Collins <ch...@runtime.io> on 2018/06/19 20:55:21 UTC
Logging changes, part 2 - Module-mapped logging
Hello all,
In my previous email, I mentioned some proposed logging changes that I
was less sure of. In particular, there are these two PRs that I
submitted:
(1) log/modlog - Module-mapped logging
(https://github.com/apache/mynewt-core/pull/1174)
(2) sys/log/full: Allow min-level per module
(https://github.com/apache/mynewt-core/pull/1179)
I think the changes are sufficiently described in the PRs themselves, so
I won't repeat that here.
My concern with (1) is: the logging API is getting pretty crowded. If
we add this feature, there really won't be room for much else in the
future, so I just want to be sure this is the logging API we want.
Re: (2) - I wanted a user-friendly way to configure individual log
levels on startup, and to turn up or down log levels while debugging.
My concern is that this would be the *fourth* place where logging is
supressed based on level. The other three are:
1. The compile time `LOG_LEVEL` setting.
2. Each log object as a minimum log level (`l_level`).
3. (1) above adds a minimum log level per module-mapping.
My feeling is that this won't be an issue in practice: `LOG_LEVEL` feels
different from the others, and I don't see people ever changing
`l_level` or module-mapping levels.
Please feel free to share any thoughts, suggestions, criticisms, etc.
Thanks,
Chris