hugsbrugs / php-log
There is no license information available for the latest version (dev-master) of this package.
PHP Log Utilities
dev-master
2019-04-19 13:30 UTC
Requires (Dev)
This package is auto-updated.
Last update: 2019-12-19 16:11:09 UTC
README
This librairy provides utilities function for simple file logging support.
Install
Install package with composer
composer require hugsbrugs/php-log
In your PHP code, load library
require_once __DIR__ . '/../vendor/autoload.php'; use Hug\Log\Log as Log;
Usage
Writes the values of certain variables (time, remote_addr, request_uri) along with a message in a log file.
Log::write_log($message, $logfile = null);
If $logfile is not defined then you have to define a constant DEFAULT_LOG with path to default log file
Transforms a PHP integer error code into a human readable PHP constant
$log_message = Log::decode_log_level($error_code);
Unit Tests
phpunit --bootstrap vendor/autoload.php tests
Author
Hugo Maugey visit my website ;)