[kata-dev] Meaning of "enable_debug" in configuration file

Christophe de Dinechin dinechin at redhat.com
Wed Jun 2 09:49:02 UTC 2021


Fabiano and I were wondering about the meaning of "enable_debug" in the
configuration file.

Right now, the surrounding comments are:

    [runtime]
    # If enabled, the runtime will log additional debug messages to the
    # system log
    # (default: disabled)
    #enable_debug = true

The comment seems to imply that if you set `enable_debug`, then you get
additional debug messages. The question is how this is supposed to interact
with the `debug` command-line option.

The two possible interpretations are:

- This activates debug when set, irrespective of the command line option.
  In other words, log if debug || enable_debug

- This enables debug when the command line is also set.
  In other words, log if debug && enable_debug

According to experiments Fabiano made, it looks like Kata is logging at
"warn" level when the command line option is not given, which means
lower-level logs are not seen. This seems to indicate that the current
interpretation is the second one, but this is not exactly the way I
personally read the comment in the configuration file.

If the intend is indeed that "enable_debug" is an administrative gate, then
maybe we also need a "debug" option in the configuration file. Or maybe this
is just to be treated as a bug, with the risk that it would change default
behavior for systems that have enable_debug in production.

Thoughts?

--
Cheers,
Christophe de Dinechin (IRC c3d)




More information about the kata-dev mailing list