2017 © Pedro Peláez
 

symfony-bundle logging-component

ICANS Logging Component

image

icans/logging-component

ICANS Logging Component

  • Thursday, July 18, 2013
  • by martin.kuster
  • Repository
  • 16 Watchers
  • 5 Stars
  • 37 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

IcansLoggingComponent

A PHP Component providing: - a Flume-Handler to write to a flume-node - a FilterInterface to write filters which can be added to the handler and filter the data - a PostProcessorInterface to write a postprocessor which can enrich the logged data - a Timer to measure execution times - a ProgressInformationInterface with default implementation to have progress messages in a CLI Command, (*1)

Installation: You can use composer to install the component from packagist: icans/logging-component, (*2)

Usages:, (*3)

ThriftFlumeHandler:, (*4)

<?php $host = localhost $port = 9129 $thriftSocket = new Thrift\Transport\TSocket($host, $port); $thriftTransport = new Thrift\Transport\TBufferedTransport($thriftSocket); $thriftProtocol = new Thrift\Protocol\TBinaryProtocolAccelerated($thriftTransport); $thriftFlumeClient = new ICANS\Component\IcansLoggingComponent\Flume\ThriftFlumeEventServerClient($thriftProtocol), (*5)

$thriftFlumeProcessingHandler = new ThriftFlumeProcessingHandler($thriftTransport, $thriftFlumeClient);, (*6)

$formatter = new Monolog\Formatter\JsonFormatter(); $thriftFlumeProcessingHandler->setFormatter($formatter);, (*7)

//the processor has to implement the ICANS\Component\IcansLoggingComponent\Api\V1\PostProcessorInterface $processor = new myPostProcessor(); $thriftFlumeProcessingHandler->pushProcessor($processor);, (*8)

$emptyFilter = new ICANS\Component\IcansLoggingComponent\Filter\EmptyFilter(); $thriftFlumeProcessingHandler->addFilter($emptyFilter);, (*9)

$recordData = array('testdata' => 'test');, (*10)

//will write to the flume node $thriftFlumeProcessingHandler->write($recordData);, (*11)

RabbitMqHandler:, (*12)

<?php, (*13)

The Versions

18/07 2013

2.0.x-dev

2.0.9999999.9999999-dev

ICANS Logging Component

  Sources   Download

The Requires

 

The Development Requires

18/07 2013

2.1.x-dev

2.1.9999999.9999999-dev

ICANS Logging Component

  Sources   Download

The Requires

 

The Development Requires

18/07 2013

dev-master

9999999-dev

ICANS Logging Component

  Sources   Download

The Requires

 

The Development Requires