1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-02-24 06:52:34 +01:00

Give the items a class

Sometimes log messages disappear behind other elements. Now i can add a custom style for it.
This commit is contained in:
Jildert Miedema 2014-11-06 11:10:21 +01:00
parent 53c6cf358b
commit 4ccc7cb16d

View File

@ -72,7 +72,7 @@ class HtmlFormatter extends NormalizerFormatter
{
$title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8');
return '<h1 style="background: '.$this->logLevels[$level].';color: #ffffff;padding: 5px;">'.$title.'</h1>';
return '<h1 style="background: '.$this->logLevels[$level].';color: #ffffff;padding: 5px;" class="monolog-output">'.$title.'</h1>';
}
/**
* Formats a log record.
@ -83,7 +83,7 @@ class HtmlFormatter extends NormalizerFormatter
public function format(array $record)
{
$output = $this->addTitle($record['level_name'], $record['level']);
$output .= '<table cellspacing="1" width="100%">';
$output .= '<table cellspacing="1" width="100%" class="monolog-output">';
$output .= $this->addRow('Message', (string) $record['message']);
$output .= $this->addRow('Time', $record['datetime']->format($this->dateFormat));