定制 gregoryv/php-logger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Flattr this git repo

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.

Design

Usage

Add to your composer.json

{
  "require": {
    "gregoryv/php-logger": "*"
  }
}

统计信息

  • 总下载量: 1.23k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-21