Class Log_console

Description

The Log_console class is a concrete implementation of the Log:: abstract class which writes message to the text console.

  • example: example not found
  • since: Log 1.1
  • author: Jon Parise <jon@php.net>

Located in /maintenance/libraries/pear/Log/console.php (line 19)

Log
   |
   --Log_console
Variable Summary
 string $_buffer
 string $_buffering
 array $_formatMap
 string $_lineFormat
 resource $_stream
 string $_timeFormat
Method Summary
 Log_console Log_console (string $name, [string $ident = ''], [array $conf = array()], [int $level = PEAR_LOG_DEBUG])
 void flush ()
 boolean log (mixed $message, [string $priority = null])
 void _Log_console ()
Variables
string $_buffer = '' (line 40)

String holding the buffered output.

  • access: private
string $_buffering = false (line 33)

Should the output be buffered or displayed immediately?

  • access: private
array $_formatMap = array('%{timestamp}' => '%1$s',
'%{ident}' => '%2$s',
'%{priority}' => '%3$s',
'%{message}' => '%4$s',
'%\{' => '%%{')
(line 64)

Hash that maps canonical format keys to position arguments for the "line format" string.

  • access: private
string $_lineFormat = '%1$s %2$s [%3$s] %4$s' (line 47)

String containing the format of a log line.

  • access: private
resource $_stream = STDOUT (line 26)

Handle to the current output stream.

  • access: private
string $_timeFormat = '%b %d %H:%M:%S' (line 56)

String containing the timestamp format. It will be passed directly to strftime(). Note that the timestamp string will generated using the current locale.

  • access: private

Inherited Variables

Inherited from Log

Log::$_id
Log::$_ident
Log::$_listeners
Log::$_mask
Log::$_opened
Log::$_priority
Methods
Constructor Log_console (line 79)

Constructs a new Log_console object.

  • access: public
Log_console Log_console (string $name, [string $ident = ''], [array $conf = array()], [int $level = PEAR_LOG_DEBUG])
  • string $name: Ignored.
  • string $ident: The identity string.
  • array $conf: The configuration array.
  • int $level: Log messages up to and including this level.
flush (line 127)

Flushes all pending ("buffered") data to the output stream.

  • since: Log 1.8.2
  • access: public
void flush ()

Redefinition of:
Log::flush()
Abstract implementation of the flush() method.
log (line 153)

Writes $message to the text console. 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
boolean log (mixed $message, [string $priority = null])
  • 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.

Redefinition of:
Log::log()
Abstract implementation of the log() method.
_Log_console (line 116)

Destructor

void _Log_console ()

Inherited Methods

Inherited From Log

 Log::alert()
 Log::attach()
 Log::close()
 Log::crit()
 Log::debug()
 Log::detach()
 Log::emerg()
 Log::err()
 Log::factory()
 Log::flush()
 Log::getIdent()
 Log::getMask()
 Log::getPriority()
 Log::info()
 Log::isComposite()
 Log::log()
 Log::MASK()
 Log::notice()
 Log::open()
 Log::priorityToString()
 Log::setIdent()
 Log::setMask()
 Log::setPriority()
 Log::singleton()
 Log::UPTO()
 Log::warning()
 Log::_announce()
 Log::_extractMessage()
 Log::_isMasked()

Documentation generated on Fri, 24 Dec 2004 13:01:49 +0000 by phpDocumentor 1.3.0RC3