|
ILIAS
release_4-4 Revision
|
Inheritance diagram for Log_mdb2:
Collaboration diagram for Log_mdb2:Public Member Functions | |
| Log_mdb2 ($name, $ident='', $conf=array(), $level=PEAR_LOG_DEBUG) | |
| Constructs a new sql logging object. More... | |
| open () | |
| Opens a connection to the database, if it has not already been opened. More... | |
| close () | |
| Closes the connection to the database if it is still open and we were the ones that opened it. More... | |
| setIdent ($ident) | |
| Sets this Log instance's identification string. More... | |
| log ($message, $priority=null) | |
| Inserts $message to the currently open database. More... | |
| _createTable () | |
| Create the log table in the database. More... | |
| _prepareStatement () | |
| Prepare the SQL insertion statement. More... | |
Public Member Functions inherited from Log | |
| _classExists ($class) | |
| Utility function which wraps PHP's class_exists() function to ensure consistent behavior between PHP versions 4 and 5. More... | |
| & | factory ($handler, $name='', $ident='', $conf=array(), $level=PEAR_LOG_DEBUG) |
| Attempts to return a concrete Log instance of type $handler. More... | |
| & | singleton ($handler, $name='', $ident='', $conf=array(), $level=PEAR_LOG_DEBUG) |
| Attempts to return a reference to a concrete Log instance of type $handler, only creating a new instance if no log instance with the same parameters currently exists. More... | |
| open () | |
| Abstract implementation of the open() method. More... | |
| close () | |
| Abstract implementation of the close() method. More... | |
| flush () | |
| Abstract implementation of the flush() method. More... | |
| log ($message, $priority=null) | |
| Abstract implementation of the log() method. More... | |
| emerg ($message) | |
| A convenience function for logging a emergency event. More... | |
| alert ($message) | |
| A convenience function for logging an alert event. More... | |
| crit ($message) | |
| A convenience function for logging a critical event. More... | |
| err ($message) | |
| A convenience function for logging a error event. More... | |
| warning ($message) | |
| A convenience function for logging a warning event. More... | |
| notice ($message) | |
| A convenience function for logging a notice event. More... | |
| info ($message) | |
| A convenience function for logging a information event. More... | |
| debug ($message) | |
| A convenience function for logging a debug event. More... | |
| _extractMessage ($message) | |
| Returns the string representation of the message data. More... | |
| _getBacktraceVars ($depth) | |
| Using debug_backtrace(), returns the file, line, and enclosing function name of the source code context from which log() was invoked. More... | |
| _format ($format, $timestamp, $priority, $message) | |
| Produces a formatted log line based on a format string and a set of variables representing the current log record and state. More... | |
| priorityToString ($priority) | |
| Returns the string representation of a PEAR_LOG_* integer constant. More... | |
| stringToPriority ($name) | |
| Returns the the PEAR_LOG_* integer constant for the given string representation of a priority name. More... | |
| MASK ($priority) | |
| Calculate the log mask for the given priority. More... | |
| UPTO ($priority) | |
| Calculate the log mask for all priorities up to the given priority. More... | |
| MIN ($priority) | |
| Calculate the log mask for all priorities greater than or equal to the given priority. More... | |
| MAX ($priority) | |
| Calculate the log mask for all priorities less than or equal to the given priority. More... | |
| setMask ($mask) | |
| Set and return the level mask for the current Log instance. More... | |
| getMask () | |
| Returns the current level mask. More... | |
| _isMasked ($priority) | |
| Check if the given priority is included in the current level mask. More... | |
| getPriority () | |
| Returns the current default priority. More... | |
| setPriority ($priority) | |
| Sets the default priority to the specified value. More... | |
| attach (&$observer) | |
| Adds a Log_observer instance to the list of observers that are listening for messages emitted by this Log instance. More... | |
| detach ($observer) | |
| Removes a Log_observer instance from the list of observers. More... | |
| _announce ($event) | |
| Informs each registered observer instance that a new message has been logged. More... | |
| isComposite () | |
| Indicates whether this is a composite class. More... | |
| setIdent ($ident) | |
| Sets this Log instance's identification string. More... | |
| getIdent () | |
| Returns the current identification string. More... | |
Data Fields | |
| $_dsn = '' | |
| $_options = array('persistent' => true) | |
| $_db = null | |
| $_statement = null | |
| $_existingConnection = false | |
| $_table = 'log_table' | |
| $_sequence = 'log_id' | |
| $_identLimit = 16 | |
| $_types | |
Data Fields inherited from Log | |
| $_opened = false | |
| $_id = 0 | |
| $_ident = '' | |
| $_priority = PEAR_LOG_INFO | |
| $_mask = PEAR_LOG_ALL | |
| $_listeners = array() | |
| $_formatMap | |
| Log_mdb2::_createTable | ( | ) |
Create the log table in the database.
Definition at line 310 of file mdb2.php.
References $result, and PEAR\isError().
Referenced by log().
Here is the call graph for this function:
Here is the caller graph for this function:| Log_mdb2::_prepareStatement | ( | ) |
Prepare the SQL insertion statement.
private
Definition at line 347 of file mdb2.php.
References PEAR\isError(), and MDB2_PREPARE_MANIP.
Referenced by log(), and open().
Here is the call graph for this function:
Here is the caller graph for this function:| Log_mdb2::close | ( | ) |
| Log_mdb2::log | ( | $message, | |
$priority = null |
|||
| ) |
Inserts $message to the currently open database.
Calls open(), if necessary. Also passes the message along to any Log_observer instances that are observing this Log.
| mixed | $message | String or object containing the message to log. |
| string | $priority | The priority of the message. Valid values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. |
Definition at line 235 of file mdb2.php.
References Log\$_ident, Log\$_priority, $result, Log\_announce(), _createTable(), Log\_extractMessage(), Log\_isMasked(), _prepareStatement(), PEAR\isError(), MDB2_ERROR_NOSUCHTABLE, MDB2_Date\mdbNow(), and open().
Here is the call graph for this function:| Log_mdb2::Log_mdb2 | ( | $name, | |
$ident = '', |
|||
$conf = array(), |
|||
$level = PEAR_LOG_DEBUG |
|||
| ) |
Constructs a new sql logging object.
| string | $name | The target SQL table. |
| string | $ident | The identification field. |
| array | $conf | The connection configuration array. |
| int | $level | Log messages up to and including this level. public |
Definition at line 115 of file mdb2.php.
References setIdent(), MDB2\singleton(), and Log\UPTO().
Here is the call graph for this function:| Log_mdb2::open | ( | ) |
Opens a connection to the database, if it has not already been opened.
This is implicitly called by log(), if necessary.
Definition at line 161 of file mdb2.php.
References Log\$_opened, _prepareStatement(), MDB2\connect(), and PEAR\isError().
Referenced by log().
Here is the call graph for this function:
Here is the caller graph for this function:| Log_mdb2::setIdent | ( | $ident | ) |
Sets this Log instance's identification string.
Note that this SQL-specific implementation will limit the length of the $ident string to sixteen (16) characters.
| string | $ident | The new identification string. |
public
Definition at line 217 of file mdb2.php.
Referenced by Log_mdb2().
Here is the caller graph for this function:| Log_mdb2::$_types |