Debug module debugbar
This commit is contained in:
parent
1abfd1f58e
commit
a6add0d8a9
@ -92,7 +92,8 @@ print '<td class="right"><input type="submit" class="button" '.$option.' value="
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DEBUGBAR_LOGS_LINES_NUMBER").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DEBUGBAR_LOGS_LINES_NUMBER").'</td>';
|
||||||
print '<td colspan="2"><input type="text" class="flat" name="DEBUGBAR_LOGS_LINES_NUMBER" value="'.(empty($conf->global->DEBUGBAR_LOGS_LINES_NUMBER)?1000:$conf->global->DEBUGBAR_LOGS_LINES_NUMBER).'">';
|
print '<td colspan="2"><input type="text" class="flat" name="DEBUGBAR_LOGS_LINES_NUMBER" value="'.(empty($conf->global->DEBUGBAR_LOGS_LINES_NUMBER) ? 250 : $conf->global->DEBUGBAR_LOGS_LINES_NUMBER).'">'; // This slow seriously output
|
||||||
|
print ' '.$langs->trans("WarningValueHigherSlowsDramaticalyOutput");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class DolLogsCollector extends MessagesCollector
|
|||||||
parent::__construct($name);
|
parent::__construct($name);
|
||||||
|
|
||||||
$this->path = $path ?: $this->getLogsFile();
|
$this->path = $path ?: $this->getLogsFile();
|
||||||
$this->lines = $conf->global->DEBUGBAR_LOGS_LINES_NUMBER ? $conf->global->DEBUGBAR_LOGS_LINES_NUMBER : 1000;
|
$this->lines = empty($conf->global->DEBUGBAR_LOGS_LINES_NUMBER) ? 250 : $conf->global->DEBUGBAR_LOGS_LINES_NUMBER; // This slow seriously output
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -8,6 +8,23 @@ use \DebugBar\DataCollector\MemoryCollector;
|
|||||||
|
|
||||||
class DolMemoryCollector extends MemoryCollector
|
class DolMemoryCollector extends MemoryCollector
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Return value of indicator
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function collect()
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
$this->updatePeakUsage();
|
||||||
|
return array(
|
||||||
|
'peak_usage' => $this->peakUsage,
|
||||||
|
//'peak_usage_str' => $this->getDataFormatter()->formatBytes($this->peakUsage, 2)
|
||||||
|
'peak_usage_str' => $this->peakUsage.' '.$langs->trans("bytes")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return widget settings
|
* Return widget settings
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1869,4 +1869,5 @@ DebugBarSetup=DebugBar Setup
|
|||||||
GeneralOptions=General Options
|
GeneralOptions=General Options
|
||||||
LogsLinesNumber=Number of lines to show on logs tab
|
LogsLinesNumber=Number of lines to show on logs tab
|
||||||
UseDebugBar=Use the debug bar
|
UseDebugBar=Use the debug bar
|
||||||
DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console
|
DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console
|
||||||
|
WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output
|
||||||
Loading…
Reference in New Issue
Block a user