2017 © Pedro Peláez
 

kohana-module kohana-loggly

A Kohana log writer for Loggly.com

image

anroots/kohana-loggly

A Kohana log writer for Loggly.com

  • Saturday, April 13, 2013
  • by anroots
  • Repository
  • 0 Watchers
  • 0 Stars
  • 120 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Kohana 3.3 log writer for Loggly.com

Write Kohana logs to a Loggly.com input. You need an account at loggly.com for this to work. The basic account is free, with quota limits., (*1)

Installation

As a Git submodule:

git submodule add git://github.com/anroots/kohana-loggly.git modules/loggly

As a Composer dependency

{
    "require": {
        "anroots/kohana-loggly":"1.*"
    }
}

Activate the module in bootstrap.php.

<?php
Kohana::modules(array(
    ...
    'loggly' => MODPATH.'kohana-loggly',
));

Create a new Loggly input

Create a new input via the loggly.com control panel. The input should be a JSON-enable HTTPS input. The module sends logs to Loggly JSON-encoded; that means you can do some really cool stuff with that data., (*2)

New Loggly Input, (*3)

Add the log writer after module activation

<?php
Kohana::$log->attach(new Log_Loggly('my-input-key'));

You can use the $levels and $min_level params of $log->attach to set restraints on when to log to Loggly:, (*4)

Kohana::$log->attach(new Log_Loggly('my-input-key'), Log::INFO); // Log only messages starting from level INFO (no DEBUG)

Log some data in your code

<?php
Kohana::$log->add(Log::EMERGENCY,'The world will end on :time.',[':time'=>time()+60]);

Results appear in the Loggly console

Loggly Console, (*5)

Licence

MIT licence, (*6)

The Versions

13/04 2013

dev-master

9999999-dev https://github.com/anroots/kohana-loggly

A Kohana log writer for Loggly.com

  Sources   Download

MIT

The Requires

 

log logging kohana log writer loggly

06/02 2013

dev-develop

dev-develop https://github.com/anroots/kohana-loggly

A Kohana log writer for Loggly.com

  Sources   Download

MIT

The Requires

 

log logging kohana log writer loggly

06/02 2013

1.0.0

1.0.0.0 https://github.com/anroots/kohana-loggly

A Kohana log writer for Loggly.com

  Sources   Download

MIT

The Requires

 

log logging kohana log writer loggly