예제 #1
0
 function show($debugbar)
 {
     $info = new debugbarItemInfo('soaplog', 'Soap logs');
     $info->htmlLabel = 'Soap ';
     $messages = jLog::getMessages(array('soap'));
     $c = count($messages);
     $info->htmlLabel .= $c;
     if ($c == 0) {
         $info->label = 'no message';
     } else {
         $c = jLog::getMessagesCount('soap');
         if ($c > count($messages)) {
             $info->popupContent .= '<p class="jxdb-msg-warning">There are ' . $c . ' soap requests. Only ' . count($messages) . ' first of them are shown.</p>';
         }
         $info->popupContent .= '<ul id="jxdb-soaplog" class="jxdb-list">';
         foreach ($messages as $msg) {
             if (get_class($msg) != 'jLogSoapMessage') {
                 continue;
             }
             $info->popupContent .= '<li>
             <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($msg->getMessage()) . '</span></a></h5>
             <div>';
             $info->popupContent .= "<h6>Headers</h6><pre>" . $msg->getHeaders() . "</pre>";
             $info->popupContent .= "<h6>Request</h6><pre>" . $this->xmlprettyprint($msg->getRequest()) . "</pre>";
             $info->popupContent .= "<h6>Response</h6><pre>" . $this->xmlprettyprint($msg->getResponse()) . "</pre>";
             $info->popupContent .= '</div></li>';
         }
         $info->popupContent .= '</ul>';
     }
     $debugbar->addInfo($info);
 }
예제 #2
0
 function show($debugbarPlugin)
 {
     $info = new debugbarItemInfo('errors', 'Errors');
     $messages = jLog::getMessages(array('error', 'warning', 'notice', 'deprecated', 'strict'));
     if (!jLog::isPluginActivated('memory', 'error')) {
         array_unshift($messages, new jLogErrorMessage('warning', 0, "Memory logger is not activated in jLog for errors, You cannot see them", '', 0, array()));
     }
     if (!jLog::isPluginActivated('memory', 'warning')) {
         array_unshift($messages, new jLogErrorMessage('warning', 0, "Memory logger is not activated in jLog for warnings, You cannot see them", '', 0, array()));
     }
     if (!jLog::isPluginActivated('memory', 'notice')) {
         array_unshift($messages, new jLogErrorMessage('notice', 0, "Memory logger is not activated in jLog for notices, You cannot see them", '', 0, array()));
     }
     $c = count($messages);
     if ($c == 0) {
         $info->label = 'no error';
         #expand             $info->htmlLabel = '<img src="data:image/png;base64,__LOGONOERROR__" alt="no errors" title="no errors"/> 0';
     } else {
         $info->popupContent = '<ul id="jxdb-errors" class="jxdb-list">';
         $maxLevel = 0;
         $currentCount = array('error' => 0, 'warning' => 0, 'notice' => 0, 'deprecated' => 0, 'strict' => 0);
         foreach ($messages as $msg) {
             if ($msg instanceof jLogErrorMessage) {
                 $cat = $msg->getCategory();
                 $currentCount[$cat]++;
                 if ($cat == 'error') {
                     $maxLevel = 1;
                 }
                 // careful: if you change the position of the div, update debugbar.js
                 $info->popupContent .= '<li class="jxdb-msg-' . $cat . '">
                 <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($msg->getMessage()) . '</span></a></h5>
                 <div><p>Code: ' . $msg->getCode() . '<br/> File: ' . htmlspecialchars($msg->getFile()) . ' ' . htmlspecialchars($msg->getLine()) . '</p>';
                 $info->popupContent .= $debugbarPlugin->formatTrace($msg->getTrace());
                 $info->popupContent .= '</div></li>';
             }
         }
         if ($maxLevel) {
             $info->htmlLabel = '<img src="' . $this->getErrorIcon() . '" alt="Errors" title="' . $c . ' errors"/> ' . $c;
             $info->popupOpened = true;
         } else {
             $info->htmlLabel = '<img src="' . $this->getWarningIcon() . '" alt="Warnings" title="There are ' . $c . ' warnings" /> ' . $c;
         }
         $info->popupContent .= '</ul>';
         foreach ($currentCount as $type => $count) {
             if (($c = jLog::getMessagesCount($type)) > $count) {
                 $info->popupContent .= '<p class="jxdb-msg-warning">There are ' . $c . ' ' . $type . ' messages. Only first ' . $count . ' messages are shown.</p>';
             }
         }
     }
     $debugbarPlugin->addInfo($info);
 }
예제 #3
0
 function show($debugbarPlugin)
 {
     $info = new debugbarItemInfo('errors', 'Errors');
     $messages = jLog::getMessages(array('error', 'warning', 'notice', 'deprecated', 'strict'));
     if (!jLog::isPluginActivated('memory', 'error')) {
         array_unshift($messages, new jLogErrorMessage('warning', 0, "Memory logger is not activated in jLog for errors, You cannot see them", '', 0, array()));
     }
     if (!jLog::isPluginActivated('memory', 'warning')) {
         array_unshift($messages, new jLogErrorMessage('warning', 0, "Memory logger is not activated in jLog for warnings, You cannot see them", '', 0, array()));
     }
     if (!jLog::isPluginActivated('memory', 'notice')) {
         array_unshift($messages, new jLogErrorMessage('notice', 0, "Memory logger is not activated in jLog for notices, You cannot see them", '', 0, array()));
     }
     $c = count($messages);
     if ($c == 0) {
         $info->label = 'no error';
         $info->htmlLabel = '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAKfSURBVDjLpZPrS1NhHMf9O3bOdmwDCWREIYKEUHsVJBI7mg3FvCxL09290jZj2EyLMnJexkgpLbPUanNOberU5taUMnHZUULMvelCtWF0sW/n7MVMEiN64AsPD8/n83uucQDi/id/DBT4Dolypw/qsz0pTMbj/WHpiDgsdSUyUmeiPt2+V7SrIM+bSss8ySGdR4abQQv6lrui6VxsRonrGCS9VEjSQ9E7CtiqdOZ4UuTqnBHO1X7YXl6Daa4yGq7vWO1D40wVDtj4kWQbn94myPGkCDPdSesczE2sCZShwl8CzcwZ6NiUs6n2nYX99T1cnKqA2EKui6+TwphA5k4yqMayopU5mANV3lNQTBdCMVUA9VQh3GuDMHiVcLCS3J4jSLhCGmKCjBEx0xlshjXYhApfMZRP5CyYD+UkG08+xt+4wLVQZA1tzxthm2tEfD3JxARH7QkbD1ZuozaggdZbxK5kAIsf5qGaKMTY2lAU/rH5HW3PLsEwUYy+YCcERmIjJpDcpzb6l7th9KtQ69fi09ePUej9l7cx2DJbD7UrG3r3afQHOyCo+V3QQzE35pvQvnAZukk5zL5qRL59jsKbPzdheXoBZc4saFhBS6AO7V4zqCpiawuptwQG+UAa7Ct3UT0hh9p9EnXT5Vh6t4C22QaUDh6HwnECOmcO7K+6kW49DKqS2DrEZCtfuI+9GrNHg4fMHVSO5kE7nAPVkAxKBxcOzsajpS4Yh4ohUPPWKTUh3PaQEptIOr6BiJjcZXCwktaAGfrRIpwblqOV3YKdhfXOIvBLeREWpnd8ynsaSJoyESFphwTtfjN6X1jRO2+FxWtCWksqBApeiFIR9K6fiTpPiigDoadqCEag5YUFKl6Yrciw0VOlhOivv/Ff8wtn0KzlebrUYwAAAABJRU5ErkJggg==" alt="no errors" title="no errors"/> 0';
     } else {
         $info->popupContent = '<ul id="jxdb-errors" class="jxdb-list">';
         $maxLevel = 0;
         $currentCount = array('error' => 0, 'warning' => 0, 'notice' => 0, 'deprecated' => 0, 'strict' => 0);
         foreach ($messages as $msg) {
             if ($msg instanceof jLogErrorMessage) {
                 $cat = $msg->getCategory();
                 $currentCount[$cat]++;
                 if ($cat == 'error') {
                     $maxLevel = 1;
                 }
                 $info->popupContent .= '<li class="jxdb-msg-' . $cat . '">
                 <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($msg->getMessage()) . '</span></a></h5>
                 <div><p>Code: ' . $msg->getCode() . '<br/> File: ' . htmlspecialchars($msg->getFile()) . ' ' . htmlspecialchars($msg->getLine()) . '</p>';
                 $info->popupContent .= $debugbarPlugin->formatTrace($msg->getTrace());
                 $info->popupContent .= '</div></li>';
             }
         }
         if ($maxLevel) {
             $info->htmlLabel = '<img src="' . $this->getErrorIcon() . '" alt="Errors" title="' . $c . ' errors"/> ' . $c;
             $info->popupOpened = true;
         } else {
             $info->htmlLabel = '<img src="' . $this->getWarningIcon() . '" alt="Warnings" title="There are ' . $c . ' warnings" /> ' . $c;
         }
         $info->popupContent .= '</ul>';
         foreach ($currentCount as $type => $count) {
             if (($c = jLog::getMessagesCount($type)) > $count) {
                 $info->popupContent .= '<p class="jxdb-msg-warning">There are ' . $c . ' ' . $type . ' messages. Only first ' . $count . ' messages are shown.</p>';
             }
         }
     }
     $debugbarPlugin->addInfo($info);
 }
예제 #4
0
 /**
  * it should adds content or set some properties on the debugbar
  * to displays some contents.
  * @param debugbarHTMLResponsePlugin $debugbar the debugbar
  */
 function show($debugbar)
 {
     $info = new debugbarItemInfo('sqllog', 'SQL queries');
     $messages = jLog::getMessages('sql');
     $info->htmlLabel = '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEYSURBVBgZBcHPio5hGAfg6/2+R980k6wmJgsJ5U/ZOAqbSc2GnXOwUg7BESgLUeIQ1GSjLFnMwsKGGg1qxJRmPM97/1zXFAAAAEADdlfZzr26miup2svnelq7d2aYgt3rebl585wN6+K3I1/9fJe7O/uIePP2SypJkiRJ0vMhr55FLCA3zgIAOK9uQ4MS361ZOSX+OrTvkgINSjS/HIvhjxNNFGgQsbSmabohKDNoUGLohsls6BaiQIMSs2FYmnXdUsygQYmumy3Nhi6igwalDEOJEjPKP7CA2aFNK8Bkyy3fdNCg7r9/fW3jgpVJbDmy5+PB2IYp4MXFelQ7izPrhkPHB+P5/PjhD5gCgCenx+VR/dODEwD+A3T7nqbxwf1HAAAAAElFTkSuQmCC" alt="SQL queries" title="SQL queries"/> ';
     if (!jLog::isPluginActivated('memory', 'sql')) {
         $info->htmlLabel .= '?';
         $info->label .= 'memory logger is not active';
     } else {
         $realCount = jLog::getMessagesCount('sql');
         $currentCount = count($messages);
         $info->htmlLabel .= $realCount;
         if ($realCount) {
             if ($realCount > $currentCount) {
                 $info->popupContent = '<p class="jxdb-msg-warning">Too many queries (' . $realCount . '). Only first ' . $currentCount . ' queries are shown.</p>';
             }
             $sqlDetailsContent = '<ul id="jxdb-sqllog" class="jxdb-list">';
             $totalTime = 0;
             foreach ($messages as $msg) {
                 if (get_class($msg) != 'jSQLLogMessage') {
                     continue;
                 }
                 $dao = $msg->getDao();
                 if ($dao) {
                     $m = 'DAO ' . $dao;
                 } else {
                     $m = substr($msg->getMessage(), 0, 50) . ' [...]';
                 }
                 $msgTime = $msg->getTime();
                 $totalTime += $msgTime;
                 $sqlDetailsContent .= '<li>
                 <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($m) . '</span></a></h5>
                 <div>
                 <p>Time: ' . $msgTime . 's</p>';
                 $sqlDetailsContent .= '<pre style="white-space:pre-wrap">' . htmlspecialchars($msg->getMessage()) . '</pre>';
                 if ($msg->getMessage() != $msg->originalQuery) {
                     $sqlDetailsContent .= '<p>Original query: </p><pre style="white-space:pre-wrap">' . htmlspecialchars($msg->originalQuery) . '</pre>';
                 }
                 $sqlDetailsContent .= $debugbar->formatTrace($msg->getTrace());
                 $sqlDetailsContent .= '</div></li>';
             }
             $sqlDetailsContent .= '</ul>';
             $info->popupContent .= '<div>Total SQL time&nbsp;: ' . $totalTime . 's</div>';
             $info->popupContent .= $sqlDetailsContent;
         }
     }
     $debugbar->addInfo($info);
 }
예제 #5
0
 /**
  * it should adds content or set some properties on the debugbar
  * to displays some contents.
  * @param debugbarHTMLResponsePlugin $debugbar the debugbar
  */
 function show($debugbar)
 {
     $info = new debugbarItemInfo('sqllog', 'SQL queries');
     $messages = jLog::getMessages('sql');
     $info->htmlLabel = '<img src="data:image/png;base64,' . base64_encode(file_get_contents(__DIR__ . '/../../htmlresponse/debugbar/icons/database.png')) . '" alt="SQL queries" title="SQL queries"/> ';
     if (!jLog::isPluginActivated('memory', 'sql')) {
         $info->htmlLabel .= '?';
         $info->label .= 'memory logger is not active';
     } else {
         $realCount = jLog::getMessagesCount('sql');
         $currentCount = count($messages);
         $info->htmlLabel .= $realCount;
         if ($realCount) {
             if ($realCount > $currentCount) {
                 $info->popupContent = '<p class="jxdb-msg-warning">Too many queries (' . $realCount . '). Only first ' . $currentCount . ' queries are shown.</p>';
             }
             $sqlDetailsContent = '<ul id="jxdb-sqllog" class="jxdb-list">';
             $totalTime = 0;
             foreach ($messages as $msg) {
                 if (get_class($msg) != 'jSQLLogMessage') {
                     continue;
                 }
                 $dao = $msg->getDao();
                 if ($dao) {
                     $m = 'DAO ' . $dao;
                 } else {
                     $m = substr($msg->getMessage(), 0, 50) . ' [...]';
                 }
                 $msgTime = $msg->getTime();
                 $totalTime += $msgTime;
                 $sqlDetailsContent .= '<li>
                 <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($m) . '</span></a></h5>
                 <div>
                 <p>Time: ' . $msgTime . 's</p>';
                 $sqlDetailsContent .= '<pre style="white-space:pre-wrap">' . htmlspecialchars($msg->getMessage()) . '</pre>';
                 if ($msg->getMessage() != $msg->originalQuery) {
                     $sqlDetailsContent .= '<p>Original query: </p><pre style="white-space:pre-wrap">' . htmlspecialchars($msg->originalQuery) . '</pre>';
                 }
                 $sqlDetailsContent .= $debugbar->formatTrace($msg->getTrace());
                 $sqlDetailsContent .= '</div></li>';
             }
             $sqlDetailsContent .= '</ul>';
             $info->popupContent .= '<div>Total SQL time&nbsp;: ' . $totalTime . 's</div>';
             $info->popupContent .= $sqlDetailsContent;
         }
     }
     $debugbar->addInfo($info);
 }
예제 #6
0
 /**
  * it should adds content or set some properties on the debugbar
  * to displays some contents.
  * @param debugbarHTMLResponsePlugin $debugbar the debugbar
  */
 function show($debugbar)
 {
     $info = new debugbarItemInfo('defaultlog', 'General logs');
     $info->htmlLabel = '<img src="data:image/png;base64,' . base64_encode(file_get_contents(__DIR__ . '/../../htmlresponse/debugbar/icons/book_open.png')) . '" alt="General logs" title="General logs"/> ';
     $messages = jLog::getMessages(array('default', 'debug'));
     $c = count($messages);
     $info->htmlLabel .= $c;
     if ($c == 0) {
         $info->label = 'no message';
     } else {
         $info->popupContent = '<ul id="jxdb-defaultlog" class="jxdb-list">';
         $currentCount = array('default' => 0, 'debug' => 0);
         foreach ($messages as $msg) {
             $cat = $msg->getCategory();
             $currentCount[$cat]++;
             $title = $msg->getFormatedMessage();
             $truncated = false;
             if (strlen($title) > 60) {
                 $truncated = true;
                 $title = substr($title, 0, 60) . '...';
             }
             $info->popupContent .= '<li>
             <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($title) . '</span></a></h5>
             <div>';
             if ($truncated) {
                 if ($msg instanceof jLogDumpMessage) {
                     $info->popupContent .= "<pre>" . htmlspecialchars($msg->getMessage()) . '</pre>';
                 } else {
                     $info->popupContent .= htmlspecialchars($msg->getMessage());
                 }
             }
             $info->popupContent .= '</div></li>';
         }
         $info->popupContent .= '</ul>';
         foreach ($currentCount as $type => $count) {
             if (($c = jLog::getMessagesCount($type)) > $count) {
                 $info->popupContent .= '<p class="jxdb-msg-warning">There are ' . $c . ' ' . ($type == 'default' ? '' : $type) . ' messages. Only first ' . $count . ' messages are shown.</p>';
             }
         }
     }
     $debugbar->addInfo($info);
 }
 /**
  * it should adds content or set some properties on the debugbar
  * to displays some contents.
  * @param debugbarHTMLResponsePlugin $debugbar the debugbar
  */
 function show($debugbar)
 {
     $info = new debugbarItemInfo('defaultlog', 'General logs');
     $info->htmlLabel = '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIASURBVDjLpVPPaxNREJ6Vt01caH4oWk1T0ZKlGIo9RG+BUsEK4kEP/Q8qPXnpqRdPBf8A8Wahhx7FQ0GF9FJ6UksqwfTSBDGyB5HkkphC9tfb7jfbtyQQTx142byZ75v5ZnZWC4KALmICPy+2DkvKIX2f/POz83LxCL7nrz+WPNcll49DrhM9v7xdO9JW330DuXrrqkFSgig5iR2Cfv3t3gNxOnv5BwU+eZ5HuON5/PMPJZKJ+yKQfpW0S7TxdC6WJaWkyvff1LDaFRAeLZj05MHsiPTS6hua0PUqtwC5sHq9zv9RYWl+nu5cETcnJ1M0M5WlWq3GsX6/T+VymRzHDluZiGYAAsw0TQahV8uyyGq1qFgskm0bHIO/1+sx1rFtchJhArwEyIQ1Gg2WD2A6nWawHQJVDIWgIJfLhQowTIeE9D0mKAU8qPC0220afsWFQoH93W6X7yCDJ+DEBeBmsxnPIJVKxWQVUwry+XyUwBlKMKwA8jqdDhOVCqVAzQDVvXAXhOdGBFgymYwrGoZBmUyGjxCCdF0fSahaFdgoTHRxfTveMCXvWfkuE3Y+f40qhgT/nMitupzApdvT18bu+YeDQwY9Xl4aG9/d/URiMBhQq/dvZMeVghtT17lSZW9/rAKsvPa/r9Fc2dw+Pe0/xI6kM9mT5vtXy+Nw2kU/5zOGRpvuMIu0YAAAAABJRU5ErkJggg==" alt="General logs" title="General logs"/> ';
     $messages = jLog::getMessages(array('default', 'debug'));
     $c = count($messages);
     $info->htmlLabel .= $c;
     if ($c == 0) {
         $info->label = 'no message';
     } else {
         $info->popupContent = '<ul id="jxdb-defaultlog" class="jxdb-list">';
         $currentCount = array('default' => 0, 'debug' => 0);
         foreach ($messages as $msg) {
             $cat = $msg->getCategory();
             $currentCount[$cat]++;
             $title = $msg->getFormatedMessage();
             $truncated = false;
             if (strlen($title) > 60) {
                 $truncated = true;
                 $title = substr($title, 0, 60) . '...';
             }
             $info->popupContent .= '<li>
             <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($title) . '</span></a></h5>
             <div>';
             if ($truncated) {
                 if ($msg instanceof jLogDumpMessage) {
                     $info->popupContent .= "<pre>" . htmlspecialchars($msg->getMessage()) . '</pre>';
                 } else {
                     $info->popupContent .= htmlspecialchars($msg->getMessage());
                 }
             }
             $info->popupContent .= '</div></li>';
         }
         $info->popupContent .= '</ul>';
         foreach ($currentCount as $type => $count) {
             if (($c = jLog::getMessagesCount($type)) > $count) {
                 $info->popupContent .= '<p class="jxdb-msg-warning">There are ' . $c . ' ' . ($type == 'default' ? '' : $type) . ' messages. Only first ' . $count . ' messages are shown.</p>';
             }
         }
     }
     $debugbar->addInfo($info);
 }
예제 #8
0
 /**
  * it should adds content or set some properties on the debugbar
  * to displays some contents.
  * @param debugbarHTMLResponsePlugin $debugbar the debugbar
  */
 function show($debugbar)
 {
     $info = new debugbarItemInfo('sqllog', 'SQL queries');
     $messages = jLog::getMessages('sql');
     #expand             $info->htmlLabel = '<img src="data:image/png;base64,__LOGOSQLLOG__" alt="SQL queries" title="SQL queries"/> ';
     if (!jLog::isPluginActivated('memory', 'sql')) {
         $info->htmlLabel .= '?';
         $info->label .= 'memory logger is not active';
     } else {
         $realCount = jLog::getMessagesCount('sql');
         $currentCount = count($messages);
         $info->htmlLabel .= $realCount;
         if ($realCount) {
             if ($realCount > $currentCount) {
                 $info->popupContent = '<p class="jxdb-msg-warning">Too many queries (' . $realCount . '). Only first ' . $currentCount . ' queries are shown.</p>';
             }
             $info->popupContent .= '<ul id="jxdb-sqllog" class="jxdb-list">';
             foreach ($messages as $msg) {
                 $dao = $msg->getDao();
                 if ($dao) {
                     $m = 'DAO ' . $dao;
                 } else {
                     $m = substr($msg->getMessage(), 0, 50) . ' [...]';
                 }
                 $info->popupContent .= '<li>
                 <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($m) . '</span></a></h5>
                 <div>
                 <p>Time: ' . $msg->getTime() . 's</p>';
                 $info->popupContent .= '<pre style="white-space:pre-wrap">' . htmlspecialchars($msg->getMessage()) . '</pre>';
                 $info->popupContent .= $debugbar->formatTrace($msg->getTrace());
                 $info->popupContent .= '</div></li>';
             }
             $info->popupContent .= '</ul>';
         }
     }
     $debugbar->addInfo($info);
 }
예제 #9
0
 function show($debugbarPlugin)
 {
     $info = new debugbarItemInfo('errors', 'Errors');
     $messages = jLog::getMessages(array('error', 'warning', 'notice', 'deprecated', 'strict'));
     if (!jLog::isPluginActivated('memory', 'error')) {
         array_unshift($messages, new jLogErrorMessage('warning', 0, "Memory logger is not activated in jLog for errors, You cannot see them", '', 0, array()));
     }
     if (!jLog::isPluginActivated('memory', 'warning')) {
         array_unshift($messages, new jLogErrorMessage('warning', 0, "Memory logger is not activated in jLog for warnings, You cannot see them", '', 0, array()));
     }
     if (!jLog::isPluginActivated('memory', 'notice')) {
         array_unshift($messages, new jLogErrorMessage('notice', 0, "Memory logger is not activated in jLog for notices, You cannot see them", '', 0, array()));
     }
     $c = count($messages);
     if ($c == 0) {
         $info->label = 'no error';
         $info->htmlLabel = '<img src="data:image/png;base64,' . base64_encode(file_get_contents(__DIR__ . '/icons/accept.png')) . '" alt="no errors" title="no errors"/> 0';
     } else {
         $info->popupContent = '<ul id="jxdb-errors" class="jxdb-list">';
         $maxLevel = 0;
         $popupOpened = false;
         $currentCount = array('error' => 0, 'warning' => 0, 'notice' => 0, 'deprecated' => 0, 'strict' => 0);
         $openOnString = jApp::config()->debugbar['errors_openon'];
         $openOn = array();
         if ($openOnString == '*') {
             $popupOpened = true;
         } else {
             $openOn = preg_split("/\\s*,\\s*/", strtoupper($openOnString));
         }
         foreach ($messages as $msg) {
             $cat = $msg->getCategory();
             $currentCount[$cat]++;
             if ($msg instanceof jLogErrorMessage) {
                 if ($cat == 'error') {
                     $maxLevel = 1;
                 }
                 if (!$popupOpened && in_array(strtoupper($cat), $openOn) !== FALSE) {
                     $popupOpened = true;
                 }
                 // careful: if you change the position of the div, update debugbar.js
                 $info->popupContent .= '<li class="jxdb-msg-' . $cat . '">
                 <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($msg->getMessage()) . '</span></a></h5>
                 <div><p>Code: ' . $msg->getCode() . '<br/> File: ' . htmlspecialchars($msg->getFile()) . ' ' . htmlspecialchars($msg->getLine()) . '</p>';
                 $info->popupContent .= $debugbarPlugin->formatTrace($msg->getTrace());
                 $info->popupContent .= '</div></li>';
             } else {
                 $info->popupContent .= '<li class="jxdb-msg-' . $cat . '">
                 <h5><a href="#" onclick="jxdb.toggleDetails(this);return false;"><span>' . htmlspecialchars($msg->getMessage()) . '</span></a></h5>
                 <div><p>Not a real PHP ' . $cat . ',  logged directly by your code. <br />Details are not available.</p></div></li>';
             }
         }
         if ($maxLevel) {
             $info->htmlLabel = '<img src="' . $this->getErrorIcon() . '" alt="Errors" title="' . $c . ' errors"/> ' . $c;
         } else {
             $info->htmlLabel = '<img src="' . $this->getWarningIcon() . '" alt="Warnings" title="There are ' . $c . ' warnings" /> ' . $c;
         }
         $info->popupOpened = $popupOpened;
         $info->popupContent .= '</ul>';
         foreach ($currentCount as $type => $count) {
             if (($c = jLog::getMessagesCount($type)) > $count) {
                 $info->popupContent .= '<p class="jxdb-msg-warning">There are ' . $c . ' ' . $type . ' messages. Only first ' . $count . ' messages are shown.</p>';
             }
         }
     }
     $debugbarPlugin->addInfo($info);
 }