Class Log_win

Description

The Log_win class is a concrete implementation of the Log abstract class that logs messages to a separate browser window.

The concept for this log handler is based on part by Craig Davis' article entitled "JavaScript Power PHP Debugging:

http://www.zend.com/zend/tut/tutorial-DebugLib.php

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

Located in /maintenance/libraries/pear/Log/win.php (line 24)

Log
   |
   --Log_win
Variable Summary
 array $_buffer
 array $_colors
 string $_name
 string $_title
Method Summary
 Log_win Log_win (string $name, [string $ident = ''], [array $conf = array()], [int $level = PEAR_LOG_DEBUG])
 void close ()
 boolean log (mixed $message, [string $priority = null])
 void open ()
 void _Log_win ()
 void _writeln (string $line)
Variables
array $_buffer = array() (line 61)

String buffer that holds line that are pending output.

  • access: private
array $_colors = array(
PEAR_LOG_EMERG => 'red',
PEAR_LOG_ALERT => 'orange',
PEAR_LOG_CRIT => 'yellow',
PEAR_LOG_ERR => 'green',
PEAR_LOG_WARNING => 'blue',
PEAR_LOG_NOTICE => 'indigo',
PEAR_LOG_INFO => 'violet',
PEAR_LOG_DEBUG => 'black'
)
(line 45)

Mapping of log priorities to colors.

  • access: private
string $_name = 'LogWindow' (line 31)

The name of the output window.

  • access: private
string $_title = 'Log Output Window' (line 38)

The title of the output window.

  • access: private

Inherited Variables

Inherited from Log

Log::$_id
Log::$_ident
Log::$_listeners
Log::$_mask
Log::$_opened
Log::$_priority
Methods
Constructor Log_win (line 72)

Constructs a new Log_win object.

  • access: public
Log_win Log_win (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.
close (line 150)

Closes the output stream if it is open. If there are still pending lines in the output buffer, the output window will be opened so that the buffer can be drained.

  • access: public
void close ()

Redefinition of:
Log::close()
Abstract implementation of the close() method.
log (line 216)

Logs $message to the output window. The message is also passed 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.
open (line 108)

The first time open() is called, it will open a new browser window and prepare it for output.

This is implicitly called by log(), if necessary.

  • access: public
void open ()

Redefinition of:
Log::open()
Abstract implementation of the open() method.
_Log_win (line 93)

Destructor

void _Log_win ()
_writeln (line 176)

Writes a single line of text to the output window.

  • access: private
void _writeln (string $line)
  • string $line: The line of text to write.

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, 11 Feb 2005 18:14:38 +0000 by phpDocumentor 1.3.0RC3