Skip to content

A Monolog Handler to push logs to a Beanstalk instance

License

Notifications You must be signed in to change notification settings

sudhaus7/beanstalkhandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beanstalkhandler

A Monolog Handler to push logs to a Beanstalk instance

Usage

// Get a Beanstalk Connection
$beanstalk = new \Pheanstalk\Pheanstalk('127.0.0.1');

// Create a the Handler
$handler = new \Sudhaus7\Monolog\BeanstalkHandler($beanstalk,'logtube');

// Create a Logger
$logger = new \Monolog\Logger('debug');
$logger->pushHandler($handler);

// Log some data
$logger->debug('I am debug', array('productId' => 123));

This is a fast and nonblocking way to log data. Just do not forget to get the data out of beanstalk later. This is very convinient

About

A Monolog Handler to push logs to a Beanstalk instance

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages