模块

Log_StdErr
继承自 Log_Writer

STDERR log writer. Writes out messages to STDERR.

package
BootPHP
category
日志
author
Tinsh
copyright
© 2005-2016 Kilofox Studio
license
http://bootphpphp.com/license

该类在 SYSPATH/classes/log/stderr.php 第 13 行声明。

常量

属性

属性

protected array $_log_levels

Numeric log level to string lookup table.

方法

public write( array $messages ) (在 Log_StdErr 中定义)

Writes each of the messages to STDERR.

$writer->write($messages);

参数

  • array $messages required - Messages

返回值

  • void

源代码

public function write(array $messages)
{
	// Set the log line format
	$format = 'time --- type: body';
	foreach ($messages as $message)
	{
		// Writes out each message
		fwrite(STDERR, PHP_EOL . strtr($format, $message));
	}
}

final public __toString( ) (在 Log_Writer 中定义)

Allows the writer to have a unique key when stored.

echo $writer;

返回值

  • string

源代码

final public function __toString()
{
	return spl_object_hash($this);
}