Skip to content

eurolink/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger

A simple PSR-3 compliant logging class for PHP.

use Eurolink\Log\Logger;

$path = __DIR__ . '/logs';
$logger = new Logger($path);
$logger->info('Test info message.');
$logger->debug('Test debug message.');

Log levels

The eight RFC 5424 levels of logs are supported, in cascading order:

Code Severity Description
0 Emergency System level failure (not application level)
1 Alert Failure that requires immediate attention
2 Critical Serious failure at the application level
3 Error Runtime errors, used to log unhandled exceptions
4 Warning May indicate that an error will occur if action is not taken
5 Notice Events that are unusual but not error conditions
6 Info Normal operational messages (no action required)
7 Debug Verbose info useful to developers for debugging purposes (default)

License

This project is licensed under the MIT license -- see the LICENSE for the full license details.

Acknowledgements

Some inspiration has been taken from the following projects:

About

A simple PSR-3 compatible logging class.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages