]> git.ipfire.org Git - people/stevee/guardian.git/commit - modules/Logger.pm
Add "Logger" module.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 20 Nov 2015 14:23:56 +0000 (15:23 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 20 Nov 2015 14:53:54 +0000 (15:53 +0100)
commita17e021e8a637d06f0758d426dc0931610e30197
tree63700bf4a0a39cc12fa5fec634e6d80395e0fa35
parent88d9af2ca2c96f98ee03de01fc0fcd0761f5b39d
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>
modules/Logger.pm [new file with mode: 0644]