Skip to content

hibrid/li3_gelf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

li3_gelf

lithium Graylog2 Logger - Roughly ported from https://github.com/Graylog2/gelf-php as lithium adapter

Config:

use lithium\analysis\Logger;

Logger::config(array(
    'gelf' => array(
    	'adapter' => 'li3_gelf\extensions\adapter\logger\Gelf',     	
    	'host' => '33.33.33.200',   
    	'defaults' => array(
    		'key' => 'value'    		
    	)
    )
));

Usage:

Logger::write('alert', 'Short Message', array('full_message' => 'It is a log', 'facility' => 'room1', 'additional' => array('one' => 'two'))); 

additional takes an array

$_levels = array(
	'debug' 	=> 0,
	'info'  	=> 1,
	'warn'  	=> 2,
	'error' 	=> 3,
	'fatal' 	=> 4,
	'unknown' 	=> 5
);

Todo: Refactor, Docs, Test -> work in progress

About

lithium Graylog2 Logger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%