hedera-web/rest/core/log.php

26 lines
397 B
PHP
Raw Normal View History

2016-07-22 20:00:27 +00:00
<?php
class Log extends Vn\Web\JsonRequest
{
2016-09-06 14:25:02 +00:00
const PARAMS = [
'file'
,'line'
,'message'
,'stack'
];
2016-09-23 22:47:34 +00:00
function run ($db)
2016-09-06 14:25:02 +00:00
{
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;
}
}