gregoryv/php-logger
最新稳定版本:0.1.3
Composer 安装命令:
composer require gregoryv/php-logger
包简介
Basic logging for php
README 文档
README
ARCHIVED! Moved to https://sogvin.com/php-logger
README
Logger module for basic intuitive logging in php. Severity levels are based on those for syslog found in RFC5424. This module is a starting point from which you can evolve your logging needs as your system grows. The simplest and default way of using it is
use gregoryv\logger\Logger;
$log = new Logger();
$log->info('something');
$x = 'something';
$log->debugf('Variable $x=%s', $x);
$log->turn('off debug'); // for this logger only
$log->debug('this will not be written');
$log->turn('off all warn'); // for this and all subsequently created loggers
The logger has methods for each severity level defined by RFC5424 6.2.1. That means you do not care much about where the messages end up initially, which surprisingly, is in the syslog.
Usage
Add to your composer.json
{
"require": {
"gregoryv/php-logger": "*"
}
}
统计信息
- 总下载量: 1.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-21
