method log documentation in bbn\Util\Info
Add information to the $info array
function($st, $file = 'misc')
{
if ( \defined('BBN_DATA_PATH') ){
$log_file = BBN_DATA_PATH.'logs/'.$file.'.log';
$i = debug_backtrace()[0];
$r = "[".date('d/m/Y H:i:s')."]\t".$i['file']." - line ".$i['line']."\n";
if ( !\is_string($st) )
$r .= print_r($st,true);
else
$r .= $st;
$r .= "\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);
}
}
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