libelektra: Error Concept Improvements Metaissue

Summary of improvement TODOs from PR https://github.com/ElektraInitiative/libelektra/pull/2435

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

I agree, but it would be handy to be able to set the log level by configuration (without recompiling).

Edit: I also think that INFO is too verbose as a default setting.

This is basically abusing the error message concept to also use for logging

I agree with both of you. There is no good concept for info messages in Elektra, but integrating them into the error concept is also not a good solution. The problem IMO is that logging in Elektra is disabled by default and even if Elektra is compiled with -DENABLE_LOGGER=ON, the logging is filtered very heavily (only message from files below src/tools are shown), unless you maintain a separate version of log.c.

IMO we should enable logging to syslog (I think we are missing openlog and closelog) by default for message of level INFO and above, no matter were the originate from.

This is basically abusing the error message concept to also use for logging. I have never seen anything like that in a project before. There should be another concept or way of logging and saving cache hit messages. I can add it here as idea but it would really be against my intuition to incorporate it into the error concept

As discussed in #2610 it would also make sense to have info messages which are not shown by default at all.