Log_sql Log_sql(
string
$name, [string
$ident = ''], [array
$conf = array()], [int
$level = PEAR_LOG_DEBUG])
Constructs a new sql logging object.
Parameters:
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.
Closes the connection to the database if it is still open and we were the ones that opened it. It is the caller's responsible to close an existing connection that was passed to us via $conf['db'].
- Return: True on success, false on failure.
- Access: public
Overrides
Log::close() (Abstract implementation of the close() method.)
boolean log(
mixed
$message, [string
$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.
- Return: True on success or false on failure.
- Access: public
Overrides
Log::log() (Abstract implementation of the log() method.)
Parameters:
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.
Opens a connection to the database, if it has not already been opened. This is implicitly called by log(), if necessary.
- Return: True on success, false on failure.
- Access: public
Overrides
Log::open() (Abstract implementation of the open() method.)
void setIdent(
string
$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.
- Since: Log 1.8.5
- Access: public
Overrides
Log::setIdent() (Sets this Log instance's identification string.)
Parameters:
string
$ident
—
The new identification string.