forked from verdnatura/hedera-web
27 lines
400 B
PHP
Executable File
27 lines
400 B
PHP
Executable File
<?php
|
|
|
|
class Log extends Vn\Web\JsonRequest
|
|
{
|
|
const PARAMS = [
|
|
'file'
|
|
,'line'
|
|
,'message'
|
|
,'stack'
|
|
];
|
|
|
|
function run ($db)
|
|
{
|
|
$user = isset ($_SESSION['user']) ? $_SESSION['user'] : 'guest';
|
|
error_log (sprintf ("Javascript: User: %s: %s(%d): %s.\n%s"
|
|
,$user
|
|
,$_REQUEST['file']
|
|
,$_REQUEST['line']
|
|
,$_REQUEST['message']
|
|
,$_REQUEST['stack']
|
|
));
|
|
return TRUE;
|
|
}
|
|
}
|
|
|
|
?>
|