The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

OSSEC::Log - Module/class for simplifying logging of OSSEC log messages

VERSION

version 0.1

DESCRIPTION

This Module/Class is part of the OSSEC distribution. It simplifies logging to files, e.g. for active response. You are able to use different logging types (info,error,fatal,debug) and select the file to log to. See the methods below.

ATTRIBUTES

ossecPath

base path to the ossec installation default /var/ossec

Type: String

file

In which file to log the messages. The file should be given as the path relative to the OSSEC configuration file.

Type: String

METHODS

error

log error message

Param1=program name which is logging
Param2=the message to log

log->error("OSSEC-Jabber","alert not found");

fatal

log fatal message and die

Param1=program name which is logging
Param2=the message to log

log->fatal("OSSEC-Jabber","could not connect to mysql server");

info

log info message

Param1=program name which is logging
Param2=the message to log

log->info("OSSEC-Jabber","alert send");

debug

log debug message

Param1=program name which is logging
Param2=the message to log

log->error("OSSEC-Jabber","found alert in database");

log

log messages to the logfile

Param1=Type of log message
Param2=program name which is logging
Param3=the message to log

AUTHOR

Domink Meyer <dmeyer@federationhq.de>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2019 by Dominik Meyer.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007