Methods

_setShortcutHandler: Defines a custom shortcut handler.

_setShortcutHandler(\sShortcut $sShortcut, \sHandloer $sHandler) : boolean

Each shortcut handler receives two parameters: - The message - The log level

access public

Parameters

$sShortcut

\sShortcut

string Shortcut name

$sHandler

\sHandloer

string Name of the function to call

Returns

booleanTrue if set was successful

_shDate: Returns the current date

_shDate() : \The

access public

Returns

\Thecurrent date

_shLevel: Returns the canonical name of the priority.

_shLevel($message, $loglevel) : \The

The canonical name is padded to 10 characters to achieve a better formatting.

access public

Parameters

$message

$loglevel

Returns

\Thecanonical log level

_shMessage: Returns the log message.

_shMessage($message, $loglevel) : \The

access public

Parameters

$message

$loglevel

Returns

\Thelog message

_shSession: Returns the current session, if existant

_shSession() : \The

access public

Returns

\Thecurrent session

cLog: Creates a new instance of the Contenido Log mechanism.

cLog(\oLogger $oLogger) : \none

cLog is a logging facility which uses PEAR::Log to do its logging, and features log categories.

The log format interface of cLog is capable of being extended by subclasses. See the note about the log shortcuts below.

About Log Shortcuts

Log shortcuts are placeholders which are replaced when a log entry is created. Placeholders start with a percentage sign (%) and contain one or more characters. Each placeholder is handled by an own function which decides what to do.

access public

Parameters

$oLogger

\oLogger

mixed Logger object (any subclass of PEAR::Log), or false if cLog should handle the logger creation

Returns

\none

log: Logs a message using the logger object

log(\sMessage $sMessage, \bPriority $bPriority) : \none

access public

Parameters

$sMessage

\sMessage

string Message to log

$bPriority

\bPriority

integer PEAR Loglevel (or default if null / omitted)

Returns

\none

setLogFormat: Sets user-defined log formats

setLogFormat(\sLogFormat $sLogFormat) : \none

The following placeholders are defined in this class: %date Date and Time %session Session-ID %level Log Level %message Message

access public

Parameters

$sLogFormat

\sLogFormat

string Format string

Returns

\none

 Properties

 

Contains all shortcut handlers

$_aShortcutHandlers : array

access private
 

Contains the logger object

$_oLogger : object

access private
 

Contains the Log Format string

$_sLogFormat : string

access private