hedera-web/rest/core/log.php

37 lines
570 B
PHP
Raw Normal View History

2016-07-22 20:00:27 +00:00
<?php
require_once ('vn/web/json-request.php');
class Log extends Vn\Web\JsonRequest
{
function run ()
{
try {
$this->login ();
}
catch (Exception $e) {}
$params = [
'file'
,'line'
,'message'
,'stack'
];
if (!$this->checkParams ($_REQUEST, $params))
return FALSE;
2016-08-25 10:47:09 +00:00
$user = isset ($_SESSION['user']) ? $_SESSION['user'] : 'guest';
error_log (sprintf ("Javascript: User: %s: %s(%d): %s.\n%s"
,$user
2016-07-22 20:00:27 +00:00
,$_REQUEST['file']
,$_REQUEST['line']
,$_REQUEST['message']
,$_REQUEST['stack']
));
return TRUE;
}
}
?>