method log documentation in bbn\Util\Logger
Add information to the $info array
function($st = '', $file = 'misc')
{
if ( \defined('BBN_DATA_PATH') && is_dir(BBN_DATA_PATH.'logs') ){
$log_file = BBN_DATA_PATH.'logs/'.$file.'.log';
$r = "[".date('d/m/Y H:i:s')."]\t";
if ( empty($st) && \count($this->reports) > 0 ){
$st = implode("\n\n", $this->reports);
$this->reports = [];
}
else{
$i = debug_backtrace()[0];
$r .= $i['file']." - line ".$i['line'];
}
$r .= "\n".( \is_string($st) ? $st : print_r($st, true) )."\n\n";
$s = ( file_exists($log_file) ) ? filesize($log_file) : 0;
if ( $s > 1048576 ){
file_put_contents($log_file.'.old',file_get_contents($log_file),FILE_APPEND);
file_put_contents($log_file,$r);
}
else{
file_put_contents($log_file,$r,FILE_APPEND);
}
}
return $this;
}
Add information to the $info array BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions