承接 k1low/yalog 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

k1low/yalog

Composer 安装命令:

composer require k1low/yalog

包简介

Yalog: Yet Another Logger for CakePHP

README 文档

README

Build Status

RotateFileLog

Usage

First, put `Yalog' directory on app/Plugin in your CakePHP application.

Second, add the following code in bootstrap.php.

<?php

    CakePlugin::load('Yalog');
    // or
    // CakePlugin::loadAll();

    App::uses('CakeLog', 'Log');
    CakeLog::config('debug', array(
        'engine' => 'Yalog.RotateFileLog',
        'types' => array('notice', 'info', 'debug'),
        'file' => 'debug',
    ));
    CakeLog::config('error', array(
        'engine' => 'Yalog.RotateFileLog',
        'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
        'file' => 'error',
    ));

Configure

Rotate

<?php
    Configure::write('Yalog.RotateFileLog.weekly', true);
    Configure::write('Yalog.RotateFileLog.rotate', 4);

Log4php (Sample)

Usage

First, put `Yalog' directory on app/Plugin in your CakePHP application.

Second, put log4php source directory on app/Plugin/Yalog/Vendor/log4php in your CakePHP application.

    http://logging.apache.org/log4php/download.html

Third, add the following code in bootstrap.php.

<?php
    CakeLog::config('debug', array(
        'engine' => 'Yalog.Log4php',
        'types' => array('notice', 'info', 'debug'),
        'file' => 'debug',
    ));
    CakeLog::config('error', array(
        'engine' => 'Yalog.Log4php',
        'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
        'file' => 'error',
    ));

Configure

Modify following,

  • app/Plugin/Yalog/Lib/Log/Engine/log4php.properties
  • Log4php::write() in app/Plugin/Yalog/Lib/Log/Engine/log4php.php

License

MIT License

统计信息

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

GitHub 信息

  • Stars: 19
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-03-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固