2017 © Pedro Peláez
 

library logger

Using PHP to trace and debug code on a website

image

canteen/logger

Using PHP to trace and debug code on a website

  • Saturday, October 12, 2013
  • by bigtimebuddy
  • Repository
  • 2 Watchers
  • 0 Stars
  • 196 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Canteen Logger

A visual display of logs from within your PHP code. Add this to any dynamic PHP page to see a list of all your debug, trace, info, warning, and error statements. For documentation of the codebase, please see Canteen Logger docs., (*1)

Installation

Install is available using Composer., (*2)

composer require canteen/logger dev-master

Including using the Composer autoloader in your index., (*3)

require 'vendor/autoload.php';

Setup

use Canteen\Logger;
Logger.init();

At the very end of your PHP code, echo the Logger contents within the body of your document. Such as:, (*4)

echo Logger::instance()->render();

Usage

Here are some examples of usage:, (*5)

// Most general trace statement
trace('Logger setup!');

// You can pass arrays or objects to the trace output
info(array(10, 100, 1000));

There are five different log levels function that come with Logger. These are in order from least to most severe. Statements are color coded in the output trace window depending on the method called., (*6)

  • trace()
  • debug()
  • info()
  • warning()
  • error()

Rebuild Documentation

This library is auto-documented using YUIDoc. To install YUIDoc, run sudo npm install yuidocjs. Also, this requires the project CanteenTheme be checked-out along-side this repository. To rebuild the docs, run the ant task from the command-line., (*7)

ant docs

License

Copyright (c) 2013 Matt Karl, (*8)

Released under the MIT License., (*9)

The Versions

12/10 2013

dev-master

9999999-dev http://github.com/Canteen/CanteenLogger

Using PHP to trace and debug code on a website

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

debug output utilities trace

12/10 2013

1.0.0

1.0.0.0 http://github.com/Canteen/CanteenLogger

Using PHP to trace and debug code on a website

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

debug output utilities trace

12/10 2013

1.0.1

1.0.1.0 http://github.com/Canteen/CanteenLogger

Using PHP to trace and debug code on a website

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

debug output utilities trace