lp:~fahad-aizaz/hipl/logging

Created by Fahad Aizaz and last modified
Get this branch:
bzr branch lp:~fahad-aizaz/hipl/logging
Only Fahad Aizaz can upload to this branch. If you are Fahad Aizaz please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Fahad Aizaz
Project:
HIPL
Status:
Abandoned

Recent revisions

5978. By Fahad Aizaz

Updated the documentation about debugging parameters

5977. By Fahad Aizaz

Handling of LOGDEBUG_LOW (debug level) updated

After adding the support for debug level messages LOGDEBUG_LOW to debug.c
and debug.h and its functionality in hip daemon, is now extended to other
files that were using the LOGDEBUG.

So now if LOGDEBUG_LOW is required by other modules, it can be used since
its support has been added to the project.

NOTE: LOGDEBUG levels are (NONE, LOW, MEDIUM, ALL). The messages with
debug_level (DIE/ASSERT, ERROR, INFO, DEBUG) are displayed on STDERR,
STDERR and SYSLOG, or SYSLOG only depends on the selection of LOGDEBUG
level either by (hardcoded) using in the application or in the
configuration file. Other than that the debug switch applied at the
execution of hip daemon, retains its effect until the configuration file
is read and the daemon is set according to the settings in the
configuration file.

5976. By Fahad Aizaz

Updated comment for logdebug and debug_level

Mistake in the comment is rectified

5975. By Fahad Aizaz

LOGDEBUG levels have been updated to accomodate a new level

A new level LOGDEBUG_LOW has been added to the enumeration of logdebug
enum logdebug {LOGDEBUG_ALL,LOGDEBUG_MEDIUM,LOGDEBUG_LOW,LOGDEBUG_NONE};

The logdebug enum selects the type of messages (error messages that can
be displayed (die, assert, error, info, debug)
Following matrix shows the type of messages that can displayed at each
level:
====================================================
| logdebug | debug_level (of messages) |
----------------------------------------------------
| NONE | DIE/ASSERT |
----------------------------------------------------
| LOW | DIE/ASSERT, ERROR |
----------------------------------------------------
| MEDIUM | DIE/ASSERT, ERROR, INFO |
----------------------------------------------------
| ALL | DIE/ASSERT, ERROR, INFO, DEBUG |
====================================================

NOTE: hip daemon now starts with the logdebug = LOW; i.e. only the
die, assert and error messages are displayed.

5974. By Fahad Aizaz

Default behaviour for logging in Test mode and Production mode.

This updates marks that the default behaviour for logging in both
test mode and production mode will be the same i.e. logging will be
in either form

5973. By Fahad Aizaz

SYSLOG functionality extended

The debug messages (info, error, debug etc) has been now placed both
on console and syslog based on the switch used to execute hipd i.e.
if hipd is executed in background mode then all the error messages
will be placed into syslog only otherwise the error messages will be
displayed on console window and also stored to syslog.

An additional switch has been added: LOGTYPE_STDERR_SYSLOG which
identifies whether messages need to be placed both on stderr & syslog
or not. Also the default functionality of the application with regard
to logging error messages has been changed. Now whether application
executed in production mode or testing mode, in both cases error
messages will be logged.

Usage:
And process that needs to use this fuctionality simply has to set the
logtype to the desired option: e.g. logtype = LOGTYPE_SYSLOG

NOTE:
This is hardcoded functionality i.e. all daemon processes log into
syslog and all foreground processes log error messages to console and
syslog.

SYSLOG facility that is used is: LOCAL6
Using LOCAL6 enables the localized logging for error messages. This can
be achived by configuring unix/linux syslog configuration.
e.g. local6.* -/var/log/hip.log
will log all messages from the processes using the facility LOCAL6
into hip.log file.

5972. By David Martin

Cosmetics: do not break "cond ? foo : bar" at colon in hipfw main.c.

It looks neater with the full expression including ? on the next line.

5971. By David Martin

Print warning for conflicting firewall options iff latter are set by user.

Instead of printing the misleading warning "Warning: timeouts (-t) have no
effect with connection tracking disabled (-F)" everytime the firewall is
started with -F, print it only when -t _and_ -F are specified by the user.

5970. By Miika Komu

Updated a maintainer script.

Configuration for building binaries for Fedora and Ubuntu are now
up-to-date with the latest distributions.

5969. By David Martin

Do not exit on iptable flush error in hipfw init script.

We are running the scripts with set -e, that means every unchecked
command returning an error exits the script. In this case the
function to flash the firewall rules prematurely exited the script
when the rules had already been flushed.
We now check the return value of the flush_iptables() function and
print a notice if an error occurs.

This commit fixes the error return value of the hipfw in bug 795848.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:hipl
This branch contains Public information 
Everyone can see this information.

Subscribers