On Mon, Jun 17, 2024 at 02:03:15PM +0200, Stefano
Brivio wrote:
We currently use a LOG_EMERG log mask to
represent the fact that we
don't know yet what the mask resulting from configuration should be,
before the command line is parsed.
However, we have the necessity of representing another phase as well,
that is, configuration is parsed but we didn't daemonise yet, or
we're not ready for operation yet. The next patch will add that
notion explicitly.
Mapping these cases to further log levels isn't really practical.
Introduce internal log flags to represent them, instead of abusing
log priorities.
Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
I like not abusing the log priorities. But, do we actually need a
flags field with constants and helpers, rather than just
bool log_conf_parsed;
and open code it from there?
Right, we probably don't need a flags field. I went this way because I
thought I needed more than two flags, originally, but I can't see that
happening after all, so I'll switch to two boolean flags.
--
Stefano