/usr/share/doc/php-analog/examples/threshold.php is in php-analog 1.0.7-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <?php
require 'Analog.php';
$log = '';
Analog::handler (Analog\Handler\Threshold::init (
Analog\Handler\Variable::init ($log),
Analog::ERROR
));
// these will be ignored
Analog::log ('Debugging...', Analog::DEBUG);
Analog::log ('Minor warning...', Analog::WARNING);
echo "Log is still empty:\n" . $log . "\n";
// but these will be logged
Analog::log ('An error...', Analog::ERROR);
Analog::log ('Oh noes!', Analog::URGENT);
echo "Log now has everything:\n" . $log;
?>
|