vasqo / logger
Customizable library for log your data
1.0.0
2022-06-15 21:43 UTC
This package is auto-updated.
Last update: 2024-10-16 02:57:55 UTC
README
This is a PHP library for logging data.
Install
composer require vasqo/logger
Usage
Display log in page:
require "vendor/autoload.php"; #optional
use Vasqo\Logger\Display\Log;
$anyData = [
"test",
"test2",
"test3"
];
Log::debug($anyData);
Print log in browser console:
require "vendor/autoload.php"; #optional
use Vasqo\Logger\Console\Log;
$anyData = [
"test",
"test2",
"test3"
];
Log::debug($anyData);
Print log in file:
require "vendor/autoload.php"; #optional
use Vasqo\Logger\File\Log;
$anyData = [
"test",
"test2",
"test3"
];
Log::debug($anyData);
Customizable
Create your class and extends Base
:
class MyLog extends \Vasqo\Logger\Base\Base
{
protected static function print($data,$type){
echo "This is my log:".parent::createText($data, $type);
}
}
////////////////////
Mylog::debug("Test Data");
Methods
use Vasqo\Logger\Display\Log;
Log::debug("data"); //basic log
Log::error("data"); //error log
Log::info("data"); //info log
Log::warning("data"); //warning log