Formats incoming records into an HTML table

This is especially useful for html email logging

CloneableInstantiable
ExtendsMonolog\Formatter\NormalizerFormatter
ImplementsMonolog\Formatter\FormatterInterface
Constants
public Monolog\Formatter\NormalizerFormatter::SIMPLE_DATE = 'Y-m-d\TH:i:sP'
Methods
public __construct(?string $dateFormat = NULL)
 
    public Monolog\Formatter\NormalizerFormatter::addJsonEncodeOption( $option)
    public format(array $record) : string
     

    Formats a log record.

    • return string The formatted record
    public formatBatch(array $records) : string
     

    Formats a set of log records.

    • return string The formatted set of records
    public Monolog\Formatter\NormalizerFormatter::getMaxNormalizeDepth() : int
     

    The maximum number of normalization levels to go through

    public Monolog\Formatter\NormalizerFormatter::getMaxNormalizeItemCount() : int
     

    The maximum number of items to normalize per level

    public Monolog\Formatter\NormalizerFormatter::removeJsonEncodeOption( $option)
    public Monolog\Formatter\NormalizerFormatter::setJsonPrettyPrint(bool $enable) : self
     

    Enables json_encode pretty print.

    public Monolog\Formatter\NormalizerFormatter::setMaxNormalizeDepth(int $maxNormalizeDepth) : self
    public Monolog\Formatter\NormalizerFormatter::setMaxNormalizeItemCount(int $maxNormalizeItemCount) : self
    Properties
    protected Monolog\Formatter\NormalizerFormatter::$dateFormat
    protected $logLevels
     

    Translates Monolog log levels to html color priorities.

    protected Monolog\Formatter\NormalizerFormatter::$maxNormalizeDepth
    protected Monolog\Formatter\NormalizerFormatter::$maxNormalizeItemCount
    Methods
    protected addRow(string $th, string $td = ' ', bool $escapeTd = true) : string
     

    Creates an HTML table row

      protected addTitle(string $title, int $level) : string
       

      Create a HTML h1 tag

      • return string
      protected convertToString( $data) : string
      protected Monolog\Formatter\NormalizerFormatter::formatDate(DateTimeInterface $date)
      protected Monolog\Formatter\NormalizerFormatter::normalize( $data, int $depth = 0)
       
      • return int|bool|string|null|array
      protected Monolog\Formatter\NormalizerFormatter::normalizeException(Throwable $e, int $depth = 0)
       
      • return array
      protected Monolog\Formatter\NormalizerFormatter::toJson( $data, bool $ignoreErrors = false) : string
       

      Return the JSON representation of a value

      • throws RuntimeException if encoding fails and errors are not ignored
      • return string if encoding fails and ignoreErrors is true 'null' is returned
      © 2020 Bruce Wells
      Search Namespaces \ Classes
      ConfigurationNumbers (0-9.) only