PHP Classes

File: public/template/logger.php

Recommend this page to a friend!
  Classes of Josantonius   PHP Logger lib   public/template/logger.php   Download  
File: public/template/logger.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Logger lib
Log errors to files and display messages on a page
Author: By
Last change:
Date: 5 years ago
Size: 2,032 bytes


Class file image Download
 * Php library to create logs easily and store them in Json format.
 * @author Josantonius -
 * @copyright Copyright (c)
 * @license - The MIT License (MIT)
 * @link
 * @since 1.1.2

use Josantonius\Logger\Logger;

<div class="jst-logger jst-card-log">

    <div class="jst-logs">

        <?php foreach (Logger::get() as $number => $log) :
$type = $log['type'];
$date = $log['date'];
$hour = $log['hour'];
$message = $log['message'];
$lowerType = strtolower($type);

$log['type'], $log['date'], $log['hour'], $log['message']);

            <p class="jst-log">
                <span id="log-<?= $number ?>" class="jst-log-line">
                    <span class="jst-c-gray">[<?= $date ?>] </span>
                    <span class="jst-c-gray">[<?= $hour ?>]</span>
                    <span class="jst-c-<?= $lowerType ?> jst-uppercase"><?= $type ?></span>
                    <span class="jst-message"><?= $message ?></span>
                <?php foreach ($log as $key => $value) : ?>
<span class="jst-c-gray jst-no-display" data-log-<?= $number ?>=""><br>[<?= $date ?>] </span>
                    <span class="jst-c-gray jst-no-display" data-log-<?= $number ?>="">[<?= $hour ?>]</span>
                    <span class="jst-c-<?= $lowerType ?> jst-no-display jst-uppercase" data-log-<?= $number ?>="">
                        <?= $key ?>
                    <span class="jst-c-gray jst-no-display" data-log-<?= $number ?>=""> ? </span>
                    <span class="jst-no-display jst-message" data-log-<?= $number ?>=""><?= $value ?></span>

                <?php endforeach; ?>


        <?php endforeach; ?>

        <div class="jst-clear"></div>