phpgenesis/logger
最新稳定版本:v1.9.1
Composer 安装命令:
composer require phpgenesis/logger
包简介
Logger for PHPGenesis
README 文档
README
The PHPGenesis Logger is an abstraction layer on top of the Laravel Log Facade and Monolog.
Installation
To install the Logger package, you can use Composer:
composer require phpgenesis/logger
Usage
To log a message, use the PHPGenesis\Logger\Logger class.
use PHPGenesis\Logger\Logger;
The following methods are available for you to use via Logger:
$message = 'This is an example logger message'; Logger::debug($message); Logger::info($message); Logger::notice($message); Logger::warning($message); Logger::error($message); Logger::critical($message); Logger::alert($message); Logger::emergency($message);
All methods all accept an additional optional parameter for context data. The context data must be an array and defaults to an empty array if not supplied
The Logger class will determine if the Laravel Log Facade is available and use it, otherwise it will use Monolog. If Laravel is available, the Logger class will use
the Laravel configuration settings for logging. Otherwise, Logger will use the settings configured in your phpgenesis.json file.
统计信息
- 总下载量: 5.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2024-05-01