GridShibCA::Logger

Default logging implmentation for the GridShib CA based on Syslog (via the Perl Sys::Syslog module). By default the GridShib-CA will log via syslog using the ``local0'' facility (changable via gridshib-ca.conf - see following section on Configuration Parameters). It logs at levels from 'debug' to 'error'.

A standard syslog configuration might look like:

 # Send anything notice or higher to system log
 local0.notice   /var/log/messages
 # Send all messages to /tmp/gridshib-ca-debug.log for debugging
 local0.*        /tmp/gridshib-ca-debug.log

By default the GridShib-CA will use a syslog identifier of ``GridShib-CA''. This is also configurable via gridshib-ca.conf if you have multiple GridShib-CA deployments on a given system.

Configuration Parameters

This class uses the following values from gridshib-ca.conf:

SyslogId

Identifying string to use with Syslog.

SyslogFacility

Facility to use with Syslog.

Methods

new()

Create a new Logger object.

Arguments: Optional dictionary

-config GridShibCA::Config object to use. This allow us to prevent a loop when constructed by Config and then we call Config->new().

Returns: Logger instance

log()

Log a message.

Arguments:

$level - one of ``info'', ``warn'', ``err''

$format, @args - as would be presented to sprintf()

Returns: Nothing

info()

Log an informative message

Arguments:

$format, @args - as would be presented to sprintf()

Returns: Nothing

warn()

Log an warning message

Arguments:

$format, @args - as would be presented to sprintf()

Returns: Nothing

debug()

Log an message at debug level.

Arguments:

$format, @args - as would be presented to sprintf()

Returns: Nothing

err()

Log an error message

Arguments:

$format, @args - as would be presented to sprintf()

Returns: Nothing

error()

Log an error message. Alias for err().

Arguments:

$format, @args - as would be presented to sprintf()

Returns: Nothing

logException()

Handle logging of an GridShibCA::Exception.

Arguments:

$ex GridShibCA::Exception (or instance of descendant) to log

Returns: Nothing

Version

GridShib-CA version 2.0.0