mundanity/drupal-logger
Composer 安装命令:
composer require mundanity/drupal-logger
包简介
A watchdog() psr-3 logger for Drupal.
README 文档
README
A simple PSR-3 implementation of a logger for Drupal watchdog calls.
Details
The PSR-3 parameter $context is passed to watchdog as variables, for use as placeholders.
class MyClass
{
public function myMethod($param)
{
$this->logger->warning('Param value was @param', ['@param' => $param]);
return $param;
}
}
The watch dog type is set as the function or class method that called the logging code. In the example above, the watchdog type is set as MyClass::myMethod.
Controlling log levels
Log levels below a specified level can be ignored, which may help reduce noise in production systems. When the class is initiated, an optional LogLevel may be provided. Events at or below the provided LogLevel will be ignored. $logger = new WatchdogLogger(LogLevel::NOTICE);
// This debug message will be ignored.
$logger->debug('Some debugging information');
By default, no events are ignored.
统计信息
- 总下载量: 3.72k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-10-09