Overview

Firelog

Log Writer module for Kohana v3 that prints log messages in Firebug console. This module uses FirePHP (http://www.firephp.org/) for writing logs.

Usages

To use, download the updated source from http://bitbucket.org/wneeds/firelog/, extract and copy to your module directory. Than rename the directory to 'firelog' and activate in your bootstrap

    Kohana::modules(array(
        ...
        'firelog'    => MODPATH.'firelog',
    ));

Now, attach Firelog with Kohana's logger. You can do it in bootstrap or anywhere. Just remember that, this should appear after activating module.

    $logWriter = new Firelog();
    Kohana::$log->attach($logWriter);

Done. Now your logged messages will be printed in Firebug console.

Message types for priority formatting

If 'warn', 'info' or 'error' is used as message-type, the message will be printed with special priority styling. Otherwise, type will be prepended to message body as - [message-type] This is message body

Sample Usage

// Loggin a plain message
Kohana::$log->add('message-type', 'Logging message test');

// Logging with priority styling
Kohana::$log->add('warn', 'Warning message test');
Kohana::$log->add('info', 'Info message test');
Kohana::$log->add('error', 'Error message test');

// Logging with place holders
Kohana::$log->add('error', 'Project ":project" not found.', array(
          ':project' => $project,
      ));

// Objects and arrays can be logged as well
Kohana::$log->add('saved', $user);

Hosted: http://bitbucket.org/wneeds/firelog/ Author: Anis uddin Ahmad anisniit@gmail.com