PAPI::BasicLog - PAPI Basic logging functions

SYNOPSIS

Inside the AuthServer.cf file:

 $cfg = \%PAPI::AuthServer::cfgVar;
 $$cfg{workingDirectory} = "/usr/local/PAPI/AS/etc";
 . . .
 
 $$cfg{logHook} = \&PAPI::BasicLog::Syslog;
 $$cfg{syslogFacility} = "local7";
 $$cfg{syslogPriority} = "info";

or

 $$cfg{logHook} = \&PAPI::BasicLog::FileLog;
 $$cfg{logFile} = "log";

DESCRIPTION

Functions included in this package provide mechanisms for logging PAPI user authentication events.

FUNCTIONS

Syslog($res, $con, $cfg)
This function is intended to be hooked at the logHook in a PAPI AuthServer. It uses the configuration variables syslogFacility (``local7'' by default) and syslogPriority (``info'' by default) to send the information to the syslog program.
It logs operations within the authentication server, using the values of connection variables like host, username, PAPIuid, PAPIerror, and PAPIop.
Arguments:
$res: String with the result of the operation requested. If the special values ``accept'' or ``reject'' are used, the function logs an specific message. Otherwise, the value of $res is logged.
$con: Hash with the PAPI AuthServer connection variables.
$cfg: Hash with the PAPI AuthServer configuration variables.
FileLog($res, $con, $cfg)
This function is intended to be hooked at the logHook in a PAPI AuthServer. It uses the configuration variables logFile (set to ``$con{workingDirectory}/log'' by default) to store the log information into a file.
It logs operations within the authentication server, using the values of connection variables like host, username, PAPIuid, PAPIerror, and PAPIop.
Arguments:
$res: String with the result of the operation requested. If the special values ``accept'' or ``reject'' are used, the function logs an specific message. Otherwise, the value of $res is logged.
$con: Hash with the PAPI AuthServer connection variables.
$cfg: Hash with the PAPI AuthServer configuration variables.

SEE ALSO

PAPI AuthServer