ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
Log Class Reference
+ Inheritance diagram for Log:
+ Collaboration diagram for Log:

Public Member Functions

 _classExists ($class)
 Utility function which wraps PHP's class_exists() function to ensure consistent behavior between PHP versions 4 and 5.
factory ($handler, $name= '', $ident= '', $conf=array(), $level=PEAR_LOG_DEBUG)
 Attempts to return a concrete Log instance of type $handler.
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.
 open ()
 Abstract implementation of the open() method.
 close ()
 Abstract implementation of the close() method.
 flush ()
 Abstract implementation of the flush() method.
 log ($message, $priority=null)
 Abstract implementation of the log() method.
 emerg ($message)
 A convenience function for logging a emergency event.
 alert ($message)
 A convenience function for logging an alert event.
 crit ($message)
 A convenience function for logging a critical event.
 err ($message)
 A convenience function for logging a error event.
 warning ($message)
 A convenience function for logging a warning event.
 notice ($message)
 A convenience function for logging a notice event.
 info ($message)
 A convenience function for logging a information event.
 debug ($message)
 A convenience function for logging a debug event.
 _extractMessage ($message)
 Returns the string representation of the message data.
 _getBacktraceVars ($depth)
 Using debug_backtrace(), returns the file, line, and enclosing function name of the source code context from which log() was invoked.
 _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.
 priorityToString ($priority)
 Returns the string representation of a PEAR_LOG_* integer constant.
 stringToPriority ($name)
 Returns the the PEAR_LOG_* integer constant for the given string representation of a priority name.
 MASK ($priority)
 Calculate the log mask for the given priority.
 UPTO ($priority)
 Calculate the log mask for all priorities up to the given priority.
 MIN ($priority)
 Calculate the log mask for all priorities greater than or equal to the given priority.
 MAX ($priority)
 Calculate the log mask for all priorities less than or equal to the given priority.
 setMask ($mask)
 Set and return the level mask for the current Log instance.
 getMask ()
 Returns the current level mask.
 _isMasked ($priority)
 Check if the given priority is included in the current level mask.
 getPriority ()
 Returns the current default priority.
 setPriority ($priority)
 Sets the default priority to the specified value.
 attach (&$observer)
 Adds a Log_observer instance to the list of observers that are listening for messages emitted by this Log instance.
 detach ($observer)
 Removes a Log_observer instance from the list of observers.
 _announce ($event)
 Informs each registered observer instance that a new message has been logged.
 isComposite ()
 Indicates whether this is a composite class.
 setIdent ($ident)
 Sets this Log instance's identification string.
 getIdent ()
 Returns the current identification string.

Data Fields

 $_opened = false
 $_id = 0
 $_ident = ''
 $_priority = PEAR_LOG_INFO
 $_mask = PEAR_LOG_ALL
 $_listeners = array()
 $_formatMap

Detailed Description

Definition at line 37 of file Log.php.

Member Function Documentation

Log::_announce (   $event)

Informs each registered observer instance that a new message has been logged.

Parameters
array$eventA hash describing the log event.

protected

Definition at line 811 of file Log.php.

Referenced by Log_null\log(), Log_syslog\log(), Log_composite\log(), Log_mcal\log(), Log_error_log\log(), Log_display\log(), Log_daemon\log(), Log_sqlite\log(), Log_firebug\log(), Log_console\log(), Log_mdb2\log(), Log_sql\log(), Log_win\log(), Log_mail\log(), and Log_file\log().

{
foreach ($this->_listeners as $id => $listener) {
if ($event['priority'] <= $this->_listeners[$id]->_priority) {
$this->_listeners[$id]->notify($event);
}
}
}

+ Here is the caller graph for this function:

Log::_classExists (   $class)

Utility function which wraps PHP's class_exists() function to ensure consistent behavior between PHP versions 4 and 5.

Autoloading behavior is always disabled.

Parameters
string$classThe name of the class whose existence should be tested.
Returns
bool True if the class exists.

private

Since
Log 1.9.13

Definition at line 117 of file Log.php.

Referenced by factory().

{
if (version_compare(PHP_VERSION, '5.0.0', 'ge')) {
return class_exists($class, false);
}
return class_exists($class);
}

+ Here is the caller graph for this function:

Log::_extractMessage (   $message)

Returns the string representation of the message data.

If $message is an object, _extractMessage() will attempt to extract the message text using a known method (such as a PEAR_Error object's getMessage() method). If a known method, cannot be found, the serialized representation of the object will be returned.

If the message data is already a string, it will be returned unchanged.

Parameters
mixed$messageThe original message data. This may be a string or any object.
Returns
string The string representation of the message.

protected

Definition at line 417 of file Log.php.

Referenced by Log_syslog\log(), Log_mcal\log(), Log_error_log\log(), Log_display\log(), Log_sqlite\log(), Log_daemon\log(), Log_firebug\log(), Log_console\log(), Log_mdb2\log(), Log_sql\log(), Log_win\log(), Log_mail\log(), and Log_file\log().

{
/*
* If we've been given an object, attempt to extract the message using
* a known method. If we can't find such a method, default to the
* "human-readable" version of the object.
*
* We also use the human-readable format for arrays.
*/
if (is_object($message)) {
if (method_exists($message, 'getmessage')) {
$message = $message->getMessage();
} else if (method_exists($message, 'tostring')) {
$message = $message->toString();
} else if (method_exists($message, '__tostring')) {
if (version_compare(PHP_VERSION, '5.0.0', 'ge')) {
$message = (string)$message;
} else {
$message = $message->__toString();
}
} else {
$message = var_export($message, true);
}
} else if (is_array($message)) {
if (isset($message['message'])) {
if (is_scalar($message['message'])) {
$message = $message['message'];
} else {
$message = var_export($message['message'], true);
}
} else {
$message = var_export($message, true);
}
} else if (is_bool($message) || $message === NULL) {
$message = var_export($message, true);
}
/* Otherwise, we assume the message is a string. */
return $message;
}

+ Here is the caller graph for this function:

Log::_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.

Returns
string Formatted log string.

protected

Since
Log 1.9.4

Definition at line 530 of file Log.php.

References $file, $timestamp, _getBacktraceVars(), and priorityToString().

Referenced by Log_error_log\log(), Log_display\log(), Log_firebug\log(), Log_console\log(), Log_mail\log(), and Log_file\log().

{
/*
* If the format string references any of the backtrace-driven
* variables (%5 %6,%7,%8), generate the backtrace and fetch them.
*/
if (preg_match('/%[5678]/', $format)) {
list($file, $line, $func, $class) = $this->_getBacktraceVars(2);
}
/*
* Build the formatted string. We use the sprintf() function's
* "argument swapping" capability to dynamically select and position
* the variables which will ultimately appear in the log string.
*/
return sprintf($format,
$this->_ident,
$this->priorityToString($priority),
$message,
isset($file) ? $file : '',
isset($line) ? $line : '',
isset($func) ? $func : '',
isset($class) ? $class : '');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Log::_getBacktraceVars (   $depth)

Using debug_backtrace(), returns the file, line, and enclosing function name of the source code context from which log() was invoked.

Parameters
int$depthThe initial number of frames we should step back into the trace.
Returns
array Array containing four strings: the filename, the line, the function name, and the class name from which log() was called.

private

Since
Log 1.9.4

Definition at line 472 of file Log.php.

References $file.

Referenced by _format().

{
/* Start by generating a backtrace from the current call (here). */
$bt = debug_backtrace();
/*
* If we were ultimately invoked by the composite handler, we need to
* increase our depth one additional level to compensate.
*/
$class = isset($bt[$depth+1]['class']) ? $bt[$depth+1]['class'] : null;
if ($class !== null && strcasecmp($class, 'Log_composite') == 0) {
$depth++;
$class = isset($bt[$depth + 1]) ? $bt[$depth + 1]['class'] : null;
}
/*
* We're interested in the frame which invoked the log() function, so
* we need to walk back some number of frames into the backtrace. The
* $depth parameter tells us where to start looking. We go one step
* further back to find the name of the encapsulating function from
* which log() was called.
*/
$file = isset($bt[$depth]) ? $bt[$depth]['file'] : null;
$line = isset($bt[$depth]) ? $bt[$depth]['line'] : 0;
$func = isset($bt[$depth + 1]) ? $bt[$depth + 1]['function'] : null;
/*
* However, if log() was called from one of our "shortcut" functions,
* we're going to need to go back an additional step.
*/
if (in_array($func, array('emerg', 'alert', 'crit', 'err', 'warning',
'notice', 'info', 'debug'))) {
$file = isset($bt[$depth + 1]) ? $bt[$depth + 1]['file'] : null;
$line = isset($bt[$depth + 1]) ? $bt[$depth + 1]['line'] : 0;
$func = isset($bt[$depth + 2]) ? $bt[$depth + 2]['function'] : null;
}
/*
* If we couldn't extract a function name (perhaps because we were
* executed from the "main" context), provide a default value.
*/
if (is_null($func)) {
$func = '(none)';
}
/* Return a 4-tuple containing (file, line, function, class). */
return array($file, $line, $func, $class);
}

+ Here is the caller graph for this function:

Log::_isMasked (   $priority)

Check if the given priority is included in the current level mask.

Parameters
integer$priorityThe priority to check.
Returns
boolean True if the given priority is included in the current log mask.

protected

Since
Log 1.7.0

Definition at line 726 of file Log.php.

References MASK().

Referenced by Log_null\log(), Log_syslog\log(), Log_error_log\log(), Log_mcal\log(), Log_display\log(), Log_daemon\log(), Log_sqlite\log(), Log_firebug\log(), Log_console\log(), Log_mdb2\log(), Log_sql\log(), Log_win\log(), Log_mail\log(), and Log_file\log().

{
return (Log::MASK($priority) & $this->_mask);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Log::alert (   $message)

A convenience function for logging an alert event.

It will log a message at the PEAR_LOG_ALERT log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 293 of file Log.php.

References log(), and PEAR_LOG_ALERT.

{
return $this->log($message, PEAR_LOG_ALERT);
}

+ Here is the call graph for this function:

Log::attach ( $observer)

Adds a Log_observer instance to the list of observers that are listening for messages emitted by this Log instance.

Parameters
object$observerThe Log_observer instance to attach as a listener.
booleanTrue if the observer is successfully attached.

public

Since
Log 1.0

Definition at line 769 of file Log.php.

{
if (!is_a($observer, 'Log_observer')) {
return false;
}
$this->_listeners[$observer->_id] = &$observer;
return true;
}
Log::close ( )

Abstract implementation of the close() method.

Since
Log 1.0

Reimplemented in Log_file, Log_sql, Log_mail, Log_mdb2, Log_win, Log_daemon, Log_sqlite, Log_firebug, Log_console, Log_display, Log_error_log, Log_mcal, Log_syslog, Log_composite, and Log_null.

Definition at line 241 of file Log.php.

{
return false;
}
Log::crit (   $message)

A convenience function for logging a critical event.

It will log a message at the PEAR_LOG_CRIT log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 310 of file Log.php.

References log(), and PEAR_LOG_CRIT.

{
return $this->log($message, PEAR_LOG_CRIT);
}

+ Here is the call graph for this function:

Log::debug (   $message)

A convenience function for logging a debug event.

It will log a message at the PEAR_LOG_DEBUG log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 395 of file Log.php.

References log(), and PEAR_LOG_DEBUG.

{
return $this->log($message, PEAR_LOG_DEBUG);
}

+ Here is the call graph for this function:

Log::detach (   $observer)

Removes a Log_observer instance from the list of observers.

Parameters
object$observerThe Log_observer instance to detach from the list of listeners.
booleanTrue if the observer is successfully detached.

public

Since
Log 1.0

Definition at line 791 of file Log.php.

{
if (!is_a($observer, 'Log_observer') ||
!isset($this->_listeners[$observer->_id])) {
return false;
}
unset($this->_listeners[$observer->_id]);
return true;
}
Log::emerg (   $message)

A convenience function for logging a emergency event.

It will log a message at the PEAR_LOG_EMERG log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 276 of file Log.php.

References log(), and PEAR_LOG_EMERG.

{
return $this->log($message, PEAR_LOG_EMERG);
}

+ Here is the call graph for this function:

Log::err (   $message)

A convenience function for logging a error event.

It will log a message at the PEAR_LOG_ERR log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 327 of file Log.php.

References log(), and PEAR_LOG_ERR.

{
return $this->log($message, PEAR_LOG_ERR);
}

+ Here is the call graph for this function:

& Log::factory (   $handler,
  $name = '',
  $ident = '',
  $conf = array(),
  $level = PEAR_LOG_DEBUG 
)

Attempts to return a concrete Log instance of type $handler.

Parameters
string$handlerThe type of concrete Log subclass to return. Attempt to dynamically include the code for this subclass. Currently, valid values are 'console', 'syslog', 'sql', 'file', and 'mcal'.
string$nameThe name of the actually log file, table, or other specific store to use. Defaults to an empty string, with which the subclass will attempt to do something intelligent.
string$identThe identity reported to the log system.
array$confA hash containing any additional configuration information that a subclass might need.
int$levelLog messages up to and including this level.
Returns
object Log The newly created concrete Log instance, or null on an error. public
Since
Log 1.0

Definition at line 151 of file Log.php.

References _classExists().

Referenced by Log_mail\close(), and singleton().

{
$handler = strtolower($handler);
$class = 'Log_' . $handler;
$classfile = 'Log/' . $handler . '.php';
/*
* Attempt to include our version of the named class, but don't treat
* a failure as fatal. The caller may have already included their own
* version of the named class.
*/
if (!Log::_classExists($class)) {
include_once $classfile;
}
/* If the class exists, return a new instance of it. */
if (Log::_classExists($class)) {
$obj = new $class($name, $ident, $conf, $level);
return $obj;
}
$null = null;
return $null;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Log::flush ( )

Abstract implementation of the flush() method.

Since
Log 1.8.2

Reimplemented in Log_file, Log_mail, Log_console, Log_firebug, and Log_composite.

Definition at line 250 of file Log.php.

{
return false;
}
Log::getIdent ( )

Returns the current identification string.

Returns
string The current Log instance's identification string.

public

Since
Log 1.6.3

Definition at line 854 of file Log.php.

References $_ident.

{
return $this->_ident;
}
Log::getMask ( )

Returns the current level mask.

Returns
interger The current level mask.

public

Since
Log 1.7.0

Definition at line 710 of file Log.php.

References $_mask.

{
return $this->_mask;
}
Log::getPriority ( )

Returns the current default priority.

Returns
integer The current default priority.

public

Since
Log 1.8.4

Definition at line 739 of file Log.php.

References $_priority.

{
}
Log::info (   $message)

A convenience function for logging a information event.

It will log a message at the PEAR_LOG_INFO log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 378 of file Log.php.

References log(), and PEAR_LOG_INFO.

{
return $this->log($message, PEAR_LOG_INFO);
}

+ Here is the call graph for this function:

Log::isComposite ( )

Indicates whether this is a composite class.

Returns
boolean True if this is a composite class.

public

Since
Log 1.0

Reimplemented in Log_composite.

Definition at line 828 of file Log.php.

{
return false;
}
Log::log (   $message,
  $priority = null 
)

Abstract implementation of the log() method.

Since
Log 1.0

Reimplemented in Log_file, Log_mail, Log_win, Log_sql, Log_mdb2, Log_console, Log_firebug, Log_daemon, Log_sqlite, Log_display, Log_error_log, Log_mcal, Log_composite, Log_syslog, and Log_null.

Definition at line 259 of file Log.php.

Referenced by alert(), crit(), debug(), emerg(), err(), info(), notice(), and warning().

{
return false;
}

+ Here is the caller graph for this function:

Log::MASK (   $priority)

Calculate the log mask for the given priority.

This method may be called statically.

Parameters
integer$priorityThe priority whose mask will be calculated.
Returns
integer The calculated log mask.

public

Since
Log 1.7.0

Definition at line 623 of file Log.php.

Referenced by _isMasked().

{
return (1 << $priority);
}

+ Here is the caller graph for this function:

Log::MAX (   $priority)

Calculate the log mask for all priorities less than or equal to the given priority.

In other words, $priority will be the highests priority matched by the resulting mask.

This method may be called statically.

Parameters
integer$priorityThe maximum priority covered by this mask.
Returns
integer The resulting log mask.

public

Since
Log 1.9.4

Definition at line 680 of file Log.php.

Referenced by UPTO().

{
return ((1 << ($priority + 1)) - 1);
}

+ Here is the caller graph for this function:

Log::MIN (   $priority)

Calculate the log mask for all priorities greater than or equal to the given priority.

In other words, $priority will be the lowest priority matched by the resulting mask.

This method may be called statically.

Parameters
integer$priorityThe minimum priority covered by this mask.
Returns
integer The resulting log mask.

public

Since
Log 1.9.4

Definition at line 661 of file Log.php.

References PEAR_LOG_ALL.

{
return PEAR_LOG_ALL ^ ((1 << $priority) - 1);
}
Log::notice (   $message)

A convenience function for logging a notice event.

It will log a message at the PEAR_LOG_NOTICE log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 361 of file Log.php.

References log(), and PEAR_LOG_NOTICE.

{
return $this->log($message, PEAR_LOG_NOTICE);
}

+ Here is the call graph for this function:

Log::open ( )

Abstract implementation of the open() method.

Since
Log 1.0

Reimplemented in Log_file, Log_mail, Log_sql, Log_mdb2, Log_daemon, Log_console, Log_win, Log_firebug, Log_display, Log_error_log, Log_sqlite, Log_mcal, Log_syslog, Log_composite, and Log_null.

Definition at line 232 of file Log.php.

{
return false;
}
Log::priorityToString (   $priority)

Returns the string representation of a PEAR_LOG_* integer constant.

Parameters
int$priorityA PEAR_LOG_* integer constant.
Returns
string The string representation of $level.

public

Since
Log 1.0

Definition at line 566 of file Log.php.

References PEAR_LOG_ALERT, PEAR_LOG_CRIT, PEAR_LOG_DEBUG, PEAR_LOG_EMERG, PEAR_LOG_ERR, PEAR_LOG_INFO, PEAR_LOG_NOTICE, and PEAR_LOG_WARNING.

Referenced by _format(), and Log_win\log().

{
$levels = array(
PEAR_LOG_EMERG => 'emergency',
PEAR_LOG_ALERT => 'alert',
PEAR_LOG_CRIT => 'critical',
PEAR_LOG_ERR => 'error',
PEAR_LOG_WARNING => 'warning',
PEAR_LOG_NOTICE => 'notice',
PEAR_LOG_INFO => 'info',
PEAR_LOG_DEBUG => 'debug'
);
return $levels[$priority];
}

+ Here is the caller graph for this function:

Log::setIdent (   $ident)

Sets this Log instance's identification string.

Parameters
string$identThe new identification string.

public

Since
Log 1.6.3

Reimplemented in Log_sql, Log_mdb2, and Log_composite.

Definition at line 841 of file Log.php.

{
$this->_ident = $ident;
}
Log::setMask (   $mask)

Set and return the level mask for the current Log instance.

Parameters
integer$maskA bitwise mask of log levels.
Returns
integer The current level mask.

public

Since
Log 1.7.0

Definition at line 695 of file Log.php.

References $_mask.

{
$this->_mask = $mask;
return $this->_mask;
}
Log::setPriority (   $priority)

Sets the default priority to the specified value.

Parameters
integer$priorityThe new default priority.

public

Since
Log 1.8.4

Definition at line 752 of file Log.php.

{
$this->_priority = $priority;
}
& Log::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.

You should use this if there are multiple places you might create a logger, you don't want to create multiple loggers, and you don't want to check for the existance of one each time. The singleton pattern does all the checking work for you.

You MUST call this method with the $var = &Log::singleton() syntax. Without the ampersand (&) in front of the method name, you will not get a reference, you will get a copy.

Parameters
string$handlerThe type of concrete Log subclass to return. Attempt to dynamically include the code for this subclass. Currently, valid values are 'console', 'syslog', 'sql', 'file', and 'mcal'.
string$nameThe name of the actually log file, table, or other specific store to use. Defaults to an empty string, with which the subclass will attempt to do something intelligent.
string$identThe identity reported to the log system.
array$confA hash containing any additional configuration information that a subclass might need.
int$levelLog messages up to and including this level.
Returns
object Log The newly created concrete Log instance, or null on an error. public
Since
Log 1.0

Definition at line 213 of file Log.php.

References factory().

Referenced by Auth\_loadLogger(), and Log_mdb2\Log_mdb2().

{
static $instances;
if (!isset($instances)) $instances = array();
$signature = serialize(array($handler, $name, $ident, $conf, $level));
if (!isset($instances[$signature])) {
$instances[$signature] = &Log::factory($handler, $name, $ident,
$conf, $level);
}
return $instances[$signature];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Log::stringToPriority (   $name)

Returns the the PEAR_LOG_* integer constant for the given string representation of a priority name.

This function performs a case-insensitive search.

Parameters
string$nameString containing a priority name.
Returns
string The PEAR_LOG_* integer contstant corresponding the the specified priority name.

public

Since
Log 1.9.0

Definition at line 595 of file Log.php.

References PEAR_LOG_ALERT, PEAR_LOG_CRIT, PEAR_LOG_DEBUG, PEAR_LOG_EMERG, PEAR_LOG_ERR, PEAR_LOG_INFO, PEAR_LOG_NOTICE, and PEAR_LOG_WARNING.

{
$levels = array(
'emergency' => PEAR_LOG_EMERG,
'alert' => PEAR_LOG_ALERT,
'critical' => PEAR_LOG_CRIT,
'error' => PEAR_LOG_ERR,
'warning' => PEAR_LOG_WARNING,
'notice' => PEAR_LOG_NOTICE,
'info' => PEAR_LOG_INFO,
'debug' => PEAR_LOG_DEBUG
);
return $levels[strtolower($name)];
}
Log::UPTO (   $priority)

Calculate the log mask for all priorities up to the given priority.

This method may be called statically.

Parameters
integer$priorityThe maximum priority covered by this mask.
Returns
integer The resulting log mask.

public

Since
Log 1.7.0
Deprecated:
deprecated since Log 1.9.4; use Log::MAX() instead

Definition at line 642 of file Log.php.

References MAX().

Referenced by Log_console\Log_console(), Log_daemon\Log_daemon(), Log_display\Log_display(), Log_error_log\Log_error_log(), Log_file\Log_file(), Log_firebug\Log_firebug(), Log_mail\Log_mail(), Log_mcal\Log_mcal(), Log_mdb2\Log_mdb2(), Log_null\Log_null(), Log_sql\Log_sql(), Log_sqlite\Log_sqlite(), Log_syslog\Log_syslog(), and Log_win\Log_win().

{
return Log::MAX($priority);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Log::warning (   $message)

A convenience function for logging a warning event.

It will log a message at the PEAR_LOG_WARNING log level.

Parameters
mixed$messageString or object containing the message to log.
Returns
boolean True if the message was successfully logged.

public

Since
Log 1.7.0

Definition at line 344 of file Log.php.

References log(), and PEAR_LOG_WARNING.

{
return $this->log($message, PEAR_LOG_WARNING);
}

+ Here is the call graph for this function:

Field Documentation

Log::$_formatMap
Initial value:
array('%{timestamp}' => '%1$s',
'%{ident}' => '%2$s',
'%{priority}' => '%3$s',
'%{message}' => '%4$s',
'%{file}' => '%5$s',
'%{line}' => '%6$s',
'%{function}' => '%7$s',
'%{class}' => '%8$s',
'%\{' => '%%{')

Definition at line 94 of file Log.php.

Log::$_id = 0

Definition at line 53 of file Log.php.

Log::$_ident = ''

Definition at line 61 of file Log.php.

Referenced by getIdent(), and Log_mdb2\log().

Log::$_listeners = array()

Definition at line 85 of file Log.php.

Log::$_mask = PEAR_LOG_ALL

Definition at line 77 of file Log.php.

Referenced by getMask(), and setMask().


The documentation for this class was generated from the following file: