stevenrombauts/monolog-mdc
Composer 安装命令:
composer require stevenrombauts/monolog-mdc
包简介
A Monolog processor to use mapped diagnostic context (MDC) with your logging
README 文档
README
A Monolog processor to use mapped diagnostic context (MDC) with your logging. This enables you to store key-values pair that will be injected into the context of all your subsequent Monolog logs.
Usage
Install with Composer:
composer require stevenrombauts/monolog-mdc
Add the processor to your Monolog instance and use as follows:
<?php use Stevenrombauts\MonologMDC; $logger = new Monolog\Logger('mdc'); $logger->pushProcessor(new MDCProcessor()); MDC::add('foo', 'bar');
The foo=bar key-value pair will be included in all subsequent logs.
统计信息
- 总下载量: 31.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-12-12