-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathzray.php
More file actions
21 lines (19 loc) · 693 Bytes
/
zray.php
File metadata and controls
21 lines (19 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
namespace LosMiddleware;
class LosZray
{
public function storeLog($context, &$storage)
{
$msg = $context["functionArgs"][0];
list($usec, $sec) = explode(" ", microtime());
$date = date("Y-m-d H:i:s", $sec).substr($usec, 1);
$storage['LosLog'][] = array('date' => $date, 'message' => $msg);
}
}
$losStorage = new \LosMiddleware\LosZray();
$loslog = new \ZRayExtension("loslog");
$loslog->setMetadata(array(
'logo' => __DIR__.DIRECTORY_SEPARATOR.'logo.png',
));
$loslog->setEnabledAfter('Laminas\Mvc\Application::init');
$loslog->traceFunction("LosMiddleware\\LosLog\\StaticLogger::save", array($losStorage, 'storeLog'), function () {});