nanapi/cakephp-fluent-logger

This package is abandoned and no longer maintained. No replacement package was suggested.

Fluent log engine plugin for CakePHP

Installs: 10 516

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 13

Forks: 2

Open Issues: 0

Type:cakephp-plugin

v1.0.1 2014-01-27 02:28 UTC

This package is not auto-updated.

Last update: 2018-07-15 23:39:39 UTC


README

Fluent log engine Plugin for CakePHP

Requirements

  • PHP5
  • CakePHP2

Installation

You can install it using the Composer.

Using Composer

{
  "require": {
    "nanapi/cakephp-fluent-logger": "v1.0.1"
  }
}

copy directory

cd app/Plugin
git clone git@github.com:nanapi/cakephp-fluent-logger.git FluentLogger

cd app/Vendor
git clone https://github.com/fluent/fluent-logger-php.git fluent/logger

How to user it

Set the FluentLogger in bootstrap.

app/Config/bootstrap.php

<?php

CakePlugin::load('FluentLogger');

CakeLog::config('debug', array(
  'engine' => 'FluentLogger.Fluent',
  'types' => array('notice', 'info', 'debug'),
  'prefix' => 'app',
  'port' => 24224,
  'host' => '127.0.0.1',
));

CakeLog::config('error', array(
  'engine' => 'FluentLogger.Fluent',
  'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
  'prefix' => 'app',
  'port' => 24224,
  'host' => '127.0.0.1',
));

your app

<?php

CakeLog::debug($param);