the/logger
Composer 安装命令:
composer require the/logger
包简介
Provides an implementation of a PSR-3: Logger Interface according to The\Framework practices.
README 文档
README
A simple way to access the logging service in a project. If no logging service is available, logs to STDERR.
Usage
To access the system default logger, simply do this:
\The\logger()->emergency('This is an emergency! Calling Doctor {name}', ['name' => 'Wolf']);
Interoperability
I accept pull requests if you want to provide interoperability with other frameworks. There are two ways a framework can be supported:
Auto Detection
The src/the.php file has a function named "logger". This function should detect if we are operating in a framework such as Symfony, Laravel or Zend - and return the appropriate logger.
Composer Provides
The framework itself can provide the The\Logger by declaring it in the composer.json file:
{
"provide": [ 'the/logger' ]
}
and then declaring a function in the The namespace like this
namespace The {
function logger() {
/* return PSR-3 logger instance */
}
}
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-21