PHP code example of anroots / kohana-loggly

1. Go to this page and download the library: Download anroots/kohana-loggly library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

anroots / kohana-loggly example snippets



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


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

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


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