contenido\classes\log\class.modulelog.php
Description: MySQL Driver for GenericDB
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.modulelog.php,v 1.3 2006/04/28 09:20:55 timo.hummel Exp $ }}
- Package
- Contenido Backend classes
- Version
- 1.3
\cModuleLog
- Parent(s)
- \cBufferedLog < \cLog
Properties

array $_aShortcutHandlersContains all shortcut handlers
- Type
- array
- Access
- private
- Inherited_from
- \cLog::$$_aShortcutHandlers
- Inherited_from
- \cBufferedLog::$$_aShortcutHandlers

object $_oLogger- Type
- object
- Access
- private
- Inherited_from
- \cLog::$$_oLogger
- Inherited_from
- \cBufferedLog::$$_oLogger

string $_sLogFormatContains the Log Format string
- Type
- string
- Access
- private
- Inherited_from
- \cLog::$$_sLogFormat
- Inherited_from
- \cBufferedLog::$$_sLogFormat
Methods

_setShortcutHandler(\sShortcut $sShortcut, \sHandloer $sHandler) : boolean_setShortcutHandler: Defines a custom shortcut handler.
Inherited from: \cLog::_setShortcutHandler()\cBufferedLog::_setShortcutHandler()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

_shLevel( $message, $loglevel) : \The_shLevel: Returns the canonical name of the priority.
Inherited from: \cLog::_shLevel()\cBufferedLog::_shLevel()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.
Inherited from: \cLog::_shMessage()\cBufferedLog::_shMessage()| Name | Type | Description |
|---|---|---|
| $message | ||
| $loglevel |
| Type | Description |
|---|---|
| \The | log message |
- Access
- public

_shModule() : \id_shModule: shortcut handler for the module id / name
| Type | Description |
|---|---|
| \id | and name of the module |
- Access
- public

_shSession() : \The_shSession: Returns the current session, if existant
Inherited from: \cLog::_shSession()\cBufferedLog::_shSession()| Type | Description |
|---|---|
| \The | current session |
- Access
- public

buffer(\sMessage $sMessage, \bPriority $iPriority = null) : \none| Name | Type | Description |
|---|---|---|
| $sMessage | \sMessage | string Message to log |
| $iPriority | \bPriority | integer PEAR Loglevel (or default if null / omitted) |
| Type | Description |
|---|---|
| \none |
- Access
- public

cBufferedLog(\oLogger $oLogger = false) : arraycBufferedLog: Creates a new instance of the Contenido BufferedLog mechanism.
Inherited from: \cBufferedLog::cBufferedLog()cBufferedLog is a logging facility which uses cLog to do its logging, and features buffered logging
| Name | Type | Description |
|---|---|---|
| $oLogger | \oLogger | object The object to use for logging, or false if a new one should be created. |
| Type | Description |
|---|---|
| array | Beschreibung |
- Access
- public
- See
- \cLog

cLog(\oLogger $oLogger = false) : \nonecLog: Creates a new instance of the Contenido Log mechanism.
Inherited from: \cLog::cLog()\cBufferedLog::cLog()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

cModuleLog(\oLogger $oLogger = false, \idmod $idmod = 0) : voidcModuleLog: Creates a new instance of the Contenido ModuleLog mechanism.
cModuleLog is a logging facility which uses cBufferedLog to do its logging, and features automatic module handling.
| Name | Type | Description |
|---|---|---|
| $oLogger | \oLogger | object The object to use for logging, or false if a new one should be created. |
| $idmod | \idmod | integer The module ID to use |
- Access
- public
- See
- \cBufferedLog

commit() : \nonecommit: Appends "REQUEST END" to the stack and commits all messages which are queued on the stack
| Type | Description |
|---|---|
| \none |
- Access
- public

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

revoke() : \nonerevoke: Revoke (discards) all messages which are queued on the stack
Inherited from: \cBufferedLog::revoke()| Type | Description |
|---|---|
| \none |
- Access
- public

setLogFormat(\sLogFormat $sLogFormat) : \nonesetLogFormat: Sets user-defined log formats
Inherited from: \cLog::setLogFormat()\cBufferedLog::setLogFormat()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