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

Laban Mwangi labeneator at gmail.com
Tue Apr 28 15:25:21 CEST 2009

Hi Jan,

I did some more work on this. Please find my comments inline

On Tue, 2009-04-28 at 09:03 +0200, Jan-Oliver Wagner wrote:

> * 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.
OK no problem :) 

We then have an openvasd logging configuration file that defines:
  - log domain 
  - log prepend string 
  - log file
  - log level threshold 

These parameters can be specified in gkeyfile groups. 

An example

#libnasl >critical messages are logged to stderr

#openvasd >warning messages have a pid prepended and
#logged to openvasd.log

#All messages that do not match the above have the pid prepended
#and are logged to openvas.log

What we can then do is handle the message routing within the logger_func
based on the message log domain. 

> * 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.
Ok with me too. It allows one to set the log_domain easily.

> * 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?
I hadn't done the actual implementation but the timestamp,pid etc can be
done there. In my next patch I'll include that.
> * The openvas_logger_func needs a very precise documentation, so that
>    it is well understood what will happen.
Ok will do... :)
> * 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.
OK will do this too
> It is very good to see this progress!!!
> Al the best
> 	Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.wald.intevation.org/pipermail/openvas-devel/attachments/20090428/bc1f5010/attachment.pgp

More information about the Openvas-devel mailing list