Code Monkey home page Code Monkey logo

yalog's Introduction

Yalog: Yet Another Logger for CakePHP

RotateFileLog

Usage

First, put `yalog' directory on app/plugins in your CakePHP application.

Second, add the following code in bootstrap.php.

<?php
    CakeLog::config('RotateFileLog',
                array(
                      'engine' => 'Yalog.RotateFileLog'
                      ));

Configure

Rotate

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

Log4php (Sample)

Usage

First, put `yalog' directory on app/plugins in your CakePHP application.

Second, put log4php source directory on app/plugins/yalog/vendors/log4php in your CakePHP application.

Third, add the following code in bootstrap.php.

<?php
    CakeLog::config('Log4php',
                array(
                      'engine' => 'Yalog.Log4php'
                      ));

Configure

Modify following,

  • app/plugins/yalog/libs/log/log4php.properties
  • Log4php::write() in app/plugins/yalog/libs/log/log4php.php

Adjust level of log output

Usage

Add the following code in bootstrap.php.

<?php
    CakeLog::config('Yalog..OutputLevel', LOG_WARNING);

Set lower level than level that you want to output the log at. (LOG_ERROR:2 > LOG_WARNING:4 > LOG_NOTICE:5 > LOG_INFO:6 > LOG_DEBUG:7)

In the example, log of "LOG_ERROR", "LOG_WARNING" and the others are output.

All output is stopped when it is set to false.

<?php
    CakeLog::config('Yalog..OutputLevel', false);

yalog's People

Contributors

k1low avatar withelmo avatar

Stargazers

kagasawa avatar

Watchers

kagasawa avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.