2017 © Pedro Peláez
 

library simple-file-logger

A simple logger that logs messages to a file.

image

digital-canvas/simple-file-logger

A simple logger that logs messages to a file.

  • Monday, December 28, 2015
  • by spekkionu
  • Repository
  • 2 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 67 % Grown

The README.md

Simple File Logger

Build Status, (*1)

A simple logger that logs messages to a file., (*2)

Installation

Install with composer, (*3)

php composer.phar require digital-canvas/simple-file-logger

or add the following to your composer.json, (*4)

"digital-canvas/simple-file-logger" : "dev-master"

```php // Create Logger instance $file = "path/to/log/file.log"; $logger = new SimpleFileLogger($file);, (*5)

// Log DEBUG message $logger->debug("DEBUG log message"); $logger->log(SimpleFileLogger::DEBUG, "DEBUG log message");, (*6)

// Log INFO message $logger->info("INFO log message"); $logger->log(SimpleFileLogger::INFO, "INFO log message");, (*7)

// Log NOTICE message $logger->notice("NOTICE log message"); $logger->log(SimpleFileLogger::NOTICE, "NOTICE log message");, (*8)

// Log WARNING message $logger->warning("WARNING log message"); $logger->log(SimpleFileLogger::WARNING, "WARNING log message");, (*9)

// Log ERROR message $logger->error("ERROR log message"); $logger->log(SimpleFileLogger::ERROR, "ERROR log message");, (*10)

// Log CRITICAL message $logger->critical("CRITICAL log message"); $logger->log(SimpleFileLogger::CRITICAL, "CRITICAL log message");, (*11)

// Log ALERT message $logger->alert("ALERT log message"); $logger->log(SimpleFileLogger::ALERT, "ALERT log message");, (*12)

// Log EMERGENCY message $logger->emergency("EMERGENCY log message"); $logger->log(SimpleFileLogger::EMERGENCY, "EMERGENCY log message");, (*13)

// Log with extra data $logger->log(SimpleFileLogger::INFO, "INFO log message", array('user' => "Bob", "exception" => new Exception()));, (*14)

The Versions

28/12 2015

dev-master

9999999-dev

A simple logger that logs messages to a file.

  Sources   Download

MIT

25/08 2014

1.0.0

1.0.0.0

A simple logger that logs messages to a file.

  Sources   Download

MIT