Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

FirePHP storage stream for logging on CakePHP 2.x

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Lib
Octocat-spinner-32 Test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
README.md

FirePHP Log engine

FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol, providing logging to Firebug Console from PHP.

WARNING: Using FirePHP on production sites can expose sensitive information. You must protect the security of your application by disabling FirePHP logging on production site.

Usage

Add to app bootstrap:

<?php
CakePlugin::load('FireLog');
App::uses('CakeLog', 'Log');
CakeLog::config('fire', array('engine' => 'FireLog.FireLog'));

Cake will autoconfigure file log, but only if there's no already configured handlers. So append file config too:

CakeLog::config('file', array('engine' => 'FileLog'));

Test it now in controller:

CakeLog::write('error', 'Missing key: '. print_r($this->request, true));

Requirements

PHP version: PHP 5.2+
CakePHP version: 2.x
Something went wrong with that request. Please try again.