[Openvas-devel] Discussion: OpenVAS CR #29

Lmwangi labeneator at gmail.com
Mon Apr 27 12:11:11 CEST 2009


Hi All,
 I've done a bit of research on glib message logging and OpenVAS
internals and have the following proposals,
 1. Reuse glib's message logging functionality
 2. Make configuration changes to logging by using key value pairs
stored in a file
 3. Make log levels be configured at runtime by changing loglevel in
the config file. For example debug will show messages from all levels
(info,warn....)
     while warning will show only messages with a severity greater
than warning (critical, errors,....)
 4. It is possible though harder and more confusing to the user to
specify per logdomain logfiles. E.g. Nasl Debug messages to go to one
file
     while critical and warning level messages go to another logfile
 5. We need a classification scheme for currently reported errors.
e.g. should we use the "error" log level (Error messages are always
fatal, resulting in a call to abort() to terminate the application)
because openvas might catch the error in the parent function (calling
the function that throws error)
  6. We also need to do away with loads of #define that were used to
catch different errors e.g. #define SSL_VERBOSE and instead move that
to debug calls
  7. We may need to add new g_debug statements to make OpenVAS output
out useful debugging messages e.g protocol dumps

An example unified log group: All logs with a level >= critical are
prepended with a PID and logged to stderr
   ["*"]
   prependstring="%p:"
   logfile="-" #Std err
   #logfile="/path/to/somewhere"
   loglevel="Critical"


A more complicated scheme. Libnasl logs everything (debug+.....) to a
logfile, openvasd logs info,warning,critical and error messages to
another
logfile while everything else greater than critical loglevel goes to another fil
   ["libnasl"]
   prependstring="%p:"
   logfile="/path/to/libnasl.log"
   loglevel="debug"

   ["openvasd"]
   prependstring="%p: %h:%m:%s "
   #logfile="/path/to/openvasd.log"
   loglevel="info"

   ["*"]
   prependstring="%p:"
   logfile="/path/to/error.log"
   loglevel="Critical"


Please have a look at http://www.openvas.org/openvas-cr-29.html

Regards
Laban


More information about the Openvas-devel mailing list