/usr/share/php/Analog/Handler/Variable.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 25 26 | <?php
namespace Analog\Handler;
/**
* Append the log info to a variable passed in as a reference.
*
* Usage:
*
* $my_log = '';
* Analog::handler (Analog\Handler\Variable::init ($my_log));
*
* Analog::log ('Log me');
* echo $my_log;
*
* Note: Uses Analog::$format for the appending format.
*/
class Variable {
public static function init (&$log) {
return function ($info, $buffered = false) use (&$log) {
$log .= ($buffered)
? $info
: vsprintf (\Analog\Analog::$format, $info);
};
}
}
|