contenido\classes\log\class.log.php
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
- Children
- \cBufferedLog
Properties
Methods


_setShortcutHandler(\sShortcut $sShortcut, \sHandloer $sHandler) : boolean
_setShortcutHandler: Defines a custom shortcut handler.
Each shortcut handler receives two parameters: - The message - The log level
Name | Type | Description |
---|---|---|
$sShortcut | \sShortcut | string Shortcut name |
$sHandler | \sHandloer | string Name of the function to call |
Type | Description |
---|---|
boolean | True if set was successful |
- Access
- public


_shDate() : \The
_shDate: Returns the current date
Type | Description |
---|---|
\The | current date |
- Access
- public


_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.
Name | Type | Description |
---|---|---|
$message | ||
$loglevel |
Type | Description |
---|---|
\The | canonical log level |
- Access
- public


_shMessage( $message, $loglevel) : \The
_shMessage: Returns the log message.
Name | Type | Description |
---|---|---|
$message | ||
$loglevel |
Type | Description |
---|---|
\The | log message |
- Access
- public


_shSession() : \The
_shSession: Returns the current session, if existant
Type | Description |
---|---|
\The | current session |
- Access
- public


cLog(\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.
Name | Type | Description |
---|---|---|
$oLogger | \oLogger | mixed Logger object (any subclass of PEAR::Log), or false if cLog should handle the logger creation |
Type | Description |
---|---|
\none |
- Access
- public


log(\sMessage $sMessage, \bPriority $bPriority = null) : \none
log: Logs a message using the logger object
Name | Type | Description |
---|---|---|
$sMessage | \sMessage | string Message to log |
$bPriority | \bPriority | integer PEAR Loglevel (or default if null / omitted) |
Type | Description |
---|---|
\none |
- Access
- public


setLogFormat(\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
Name | Type | Description |
---|---|---|
$sLogFormat | \sLogFormat | string Format string |
Type | Description |
---|---|
\none |
- Access
- public