#11 sane logging levels settable from config file


This patch reverses the numerical priority values of
the first four logging levels of racoon as follows:
#define LLV_ERROR 1
#define LLV_WARNING 2
#define LLV_NOTIFY 3
#define LLV_INFO 4
#define LLV_DEBUG 5
#define LLV_DEBUG2 6

The DEBUG and DEBUG2 remain the same.

This order is more natural with respect to the
priority (or severity) of individual logging levels
than the original (with the first four levels in the
order: LLV_INFO = 1, ..., LLV_ERROR = 4).
The original order bore a misconception in that the
first four levels had increasing severities after
which there was a sharp break with level 5 and beyond
(now with decreasing severities!) having even lower
severity than the level one (the least severe level
of the first four).

The patch further modifies the syntax and semantics
of the racoon's configuration file's logging level
statement in the following way (taken from patched
man page):
log level;
define logging level. level is one of
following: error,
warning, notify, info, debug and
debug2. The default is info.
If you set the logging level too high on
slower machines, IKE
negotiation can fail due to timing
constraint changes.

ie. the statement now directly sets the logging level
of racoon to the value specified (not exactly so
beacuse the final loging level is the value specified
by this statement plus the number of -d options
passed to racoon on the command line)
Originally one could only specify levels of notify,
debug and debug2 with notify making racoon log all
messages of first four severity levels (not just the
first three as the "notify" keyword might suggest)
and debug and debug2 making racoon log all messages
up to rspective LLV_DEBUG* severity. (Provided that
no -d option was passed to racoon on the command line
in which case this statement was completely ignored.)

This patch was motivated by an effort to decrease the
amount of logging messages produced by racoon, which
was not possible before since there was no way to
stop racoon from logging all messages of the first
four severity levels. (Not only it was impossible
without a patch, it was also impossible without the
change in the ordering of the severity levels in
order for the resulting effect of setting logging
level to be sane.) After applying this patch the cure
for stopping racoon from being too verbose is as
simple as stating (for example):
log warning;
in the racoon's configuration file, which makes
racoon to log only warning and error messages (but
only from the point when the configuration file is
parsed, ie. there may appear some less severe logging
messagges before this happens but none afterwards!).
Michal Ruzicka


  • Nobody/Anonymous

    Logged In: NO

    Reported to HEAD.

    Thanks for the patch.

  • Timo Teras

    Timo Teras - 2009-01-09
    • status: open --> closed-fixed
  • Timo Teras

    Timo Teras - 2009-01-16

    Closing all sourceforge.net bugs. If this issue has not been cared for please submit a new bug report to https://trac.ipsec-tools.net/ issue tracker. Thank you.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks