contenido\classes\log\class.log.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

Description: Log facility

Requirements:

Author
Timo A. Hummel  
Con_php_req
5.0  
Copyright
four for business AG  
License
http://www.contenido.org/license/LIZENZ.txt  
Link
http://www.4fb.de  
Link
{@internal created 2004-09-28 $Id: class.log.php,v 1.2 2006/04/28 09:20:55 timo.hummel Exp $ }}  
Package
Contenido Backend classes  
Version
1.2  

\cLog

Package: Default
Children
\cBufferedLog

Properties

>VPropertypublicarray $_aShortcutHandlers

Contains all shortcut handlers

Details
Type
array
Access
private  
>VPropertypublicobject $_oLogger

Contains the logger object

Details
Type
object
Access
private  
>VPropertypublicstring $_sLogFormat

Contains the Log Format string

Details
Type
string
Access
private  

Methods

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

_setShortcutHandler: Defines a custom shortcut handler.

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

Parameters
NameTypeDescription
$sShortcut\sShortcut

string Shortcut name

$sHandler\sHandloer

string Name of the function to call

Returns
TypeDescription
booleanTrue if set was successful
Details
Access
public  
methodpublic_shDate() : \The

_shDate: Returns the current date

Returns
TypeDescription
\Thecurrent date
Details
Access
public  
methodpublic_shLevel( $message,  $loglevel) : \The

_shLevel: Returns the canonical name of the priority.

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

Parameters
NameTypeDescription
$message
$loglevel
Returns
TypeDescription
\Thecanonical log level
Details
Access
public  
methodpublic_shMessage( $message,  $loglevel) : \The

_shMessage: Returns the log message.

Parameters
NameTypeDescription
$message
$loglevel
Returns
TypeDescription
\Thelog message
Details
Access
public  
methodpublic_shSession() : \The

_shSession: Returns the current session, if existant

Returns
TypeDescription
\Thecurrent session
Details
Access
public  
methodpubliccLog(\oLogger $oLogger = false) : \none

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

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.

Parameters
NameTypeDescription
$oLogger\oLogger

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

Returns
TypeDescription
\none
Details
Access
public  
methodpubliclog(\sMessage $sMessage, \bPriority $bPriority = null) : \none

log: Logs a message using the logger object

Parameters
NameTypeDescription
$sMessage\sMessage

string Message to log

$bPriority\bPriority

integer PEAR Loglevel (or default if null / omitted)

Returns
TypeDescription
\none
Details
Access
public  
methodpublicsetLogFormat(\sLogFormat $sLogFormat) : \none

setLogFormat: Sets user-defined log formats

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

Parameters
NameTypeDescription
$sLogFormat\sLogFormat

string Format string

Returns
TypeDescription
\none
Details
Access
public  
Documentation was generated by phpDocumentor 2.0.0a12.