[Openvas-devel] Hamonized Logging (CR #29)

Jan-Oliver Wagner jan-oliver.wagner at intevation.de
Tue Apr 28 09:03:32 CEST 2009

Hello Laban,

thanks for the initial patch!

On Monday 27 April 2009 12:55:25 Lmwangi wrote:
>  openvasd.diff sets the handler in main for glib's message logging
>  openvas-libnasl_nasl_nasl_grammar is an example port of *printfs to
> glib logging functions
>  openvas-libnasl_nasl_nasl_socket was a test to generate lots of debug
> messages during libnasl socket functions.
> At the moment I have set my logging threshold   to be warnings and
> more severe messages. You may lower this to debug. I intend to move
> the threshold setting to a config file.

I've not traced all of your changes. 
However, I have some comments:

* we should hasve "log_domain" a configuration option in openvasd.conf
   rather than a compiletime option

* We should us variables for g_log like "log_domain_nasl", "log_domain_otp",
   "log_domain_ssl", etc. In normal case all point to the same log_domain,
   but then it is easier to set a focus on a specific topic in the future.

* we need to discuss whether to always use g_log, or whether to apply 
g_ctitical etc.
  I tend to prefer the g_log-only approach.

* IIUC, the logger func can take care of PID, timestamp etc. 
   So, actually, we can cut down many fprintf's to only the message.
   You haven't done so in the patch. Was that intentionally or by accident?

* The openvas_logger_func needs a very precise documentation, so that
   it is well understood what will happen.

* We should not forget that the compendium needs to be extended with
  a section for developers on how to use logging and which log_domains
  should be used.

It is very good to see this progress!!!

Al the best


Dr. Jan-Oliver Wagner | ++49-541-335 08 30  |  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

More information about the Openvas-devel mailing list