2017 © Pedro Peláez
 

library log

The cjs Log package.

image

cjs/log

The cjs Log package.

  • Saturday, May 13, 2017
  • by jellycheng
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

cjsLog

cjs,log,cjs log,monolog, (*1)

monolog

https://github.com/Seldaek/monolog, (*2)

demo

$channel = 'dev'; $log = new \CjsLog\Writer( new \Monolog\Logger($channel) );, (*3)

设置日志保存文件

$logFile = sprintf("/data/logs/app/%s.%s", 'jelly', 'log');, (*4)

$log->useFiles($logFile, 'debug'); #只一个文件的方式

设置一天一个日志文件,最大保留N天文件

$log->useDailyFiles($logFile, 5, 'debug');, (*5)

写info级别日志

$log->info("hello test");, (*6)

写debug级别日志

$log->debug("hello test");, (*7)

写warning级别日志

$log->warning("hello test");, (*8)

The Versions

13/05 2017

dev-master

9999999-dev http://www.qianguopai.com

The cjs Log package.

  Sources   Download

MIT

The Requires

 

by jelly