STDOUT log writer. Writes out messages to STDOUT.
Class declared in SYSPATH/classes/log/stdout.php on line 3.
array
$_log_levelslink to thisWrites each of the messages to STDOUT.
$writer
->write(
$messages
);
array
$messages
required - $messagesvoid
public
function
write(
array
$messages
)
{
// Set the log line format
$format
=
'time --- type: body'
;
foreach
(
$messages
as
$message
)
{
// Writes out each message
fwrite(STDOUT, PHP_EOL.
strtr
(
$format
,
$message
));
}
}
Allows the writer to have a unique key when stored.
echo
$writer
;
string
final
public
function
__toString()
{
return
spl_object_hash(
$this
);
}