]> git.ipfire.org Git - people/stevee/guardian.git/log
people/stevee/guardian.git
8 years agoAdd "Socket" module.
Stefan Schantl [Fri, 20 Nov 2015 21:37:29 +0000 (22:37 +0100)] 
Add "Socket" module.

The Socket module provides an IPC mechanism for guardian, based
on a UNIX socket. It contains a server, a client and a message parser
function which easily can be re-used.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
8 years agoAdd "Config" module.
Stefan Schantl [Fri, 20 Nov 2015 20:56:49 +0000 (21:56 +0100)] 
Add "Config" module.

This module contains functions to read, validate and set various
configure options which are used in guardian.

The main functions called "UseConfig" allows to pass which config file
should be read and validates the input by calling a subfunction. The
validated settings will be returend as a hash.

The "CheckConfig" function directly can be called with a hash, which
contains the various config options and values and will return an
error message if there are any problems.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
8 years agoAdd "Logger" module.
Stefan Schantl [Fri, 20 Nov 2015 14:23:56 +0000 (15:23 +0100)] 
Add "Logger" module.

This module is responsible for logging any messages which are generated by
guaridan or one of its submodules during runtime and displays them on the
console or send them to the syslog.

When using the logger module, it has to be initialized as an object, which calls the
"New" function and requires the following settings:

* LogLevel - which has to be "off, err, info or debug"
* LogFacility - which currently supports "console or syslog"

After that, logging can be done, by using the "Log" function on the object, by providing
the type of the message (LogLevel) and the message self.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
8 years agoInitial checkin.
Stefan Schantl [Thu, 12 Nov 2015 22:07:44 +0000 (23:07 +0100)] 
Initial checkin.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>