dev-master
9999999-devA simple logger that logs messages to a file.
MIT
1.0.0
1.0.0.0A simple logger that logs messages to a file.
MIT
A simple logger that logs messages to a file.
A simple logger that logs messages to a file., (*2)
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)
A simple logger that logs messages to a file.
MIT
A simple logger that logs messages to a file.
MIT