Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 621
Zeile 12... Zeile 12...
12
namespace Monolog\Handler;
12
namespace Monolog\Handler;
Zeile 13... Zeile 13...
13
 
13
 
14
use Monolog\Formatter\FormatterInterface;
14
use Monolog\Formatter\FormatterInterface;
15
use Monolog\Formatter\LineFormatter;
15
use Monolog\Formatter\LineFormatter;
-
 
16
use Monolog\Utils;
Zeile 16... Zeile 17...
16
use Monolog\Utils;
17
use Monolog\Logger;
17
 
18
 
18
use function count;
19
use function count;
19
use function headers_list;
20
use function headers_list;
Zeile 175... Zeile 176...
175
        foreach (static::$records as $record) {
176
        foreach (static::$records as $record) {
176
            $context = static::dump('Context', $record['context']);
177
            $context = static::dump('Context', $record['context']);
177
            $extra = static::dump('Extra', $record['extra']);
178
            $extra = static::dump('Extra', $record['extra']);
Zeile 178... Zeile 179...
178
 
179
 
179
            if (empty($context) && empty($extra)) {
180
            if (empty($context) && empty($extra)) {
180
                $script[] = static::call_array('log', static::handleStyles($record['formatted']));
181
                $script[] = static::call_array(static::getConsoleMethodForLevel($record['level']), static::handleStyles($record['formatted']));
181
            } else {
182
            } else {
182
                $script = array_merge(
183
                $script = array_merge(
183
                    $script,
184
                    $script,
184
                    [static::call_array('groupCollapsed', static::handleStyles($record['formatted']))],
185
                    [static::call_array('groupCollapsed', static::handleStyles($record['formatted']))],
Zeile 190... Zeile 191...
190
        }
191
        }
Zeile 191... Zeile 192...
191
 
192
 
192
        return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);";
193
        return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);";
Zeile -... Zeile 194...
-
 
194
    }
-
 
195
 
-
 
196
    private static function getConsoleMethodForLevel(int $level): string
-
 
197
    {
-
 
198
        return [
-
 
199
            Logger::DEBUG => 'debug',
-
 
200
            Logger::INFO => 'info',
-
 
201
            Logger::NOTICE => 'info',
-
 
202
            Logger::WARNING => 'warn',
-
 
203
            Logger::ERROR => 'error',
-
 
204
            Logger::CRITICAL => 'error',
-
 
205
            Logger::ALERT => 'error',
-
 
206
            Logger::EMERGENCY => 'error',
-
 
207
        ][$level] ?? 'log';
193
    }
208
    }
194
 
209
 
195
    /**
210
    /**
196
     * @return string[]
211
     * @return string[]
197
     */
212
     */