2017 © Pedro PelĂĄez
 

library logjamdispatcher

Basic client to dispatch log messages to logjam using ZeroMQ.

image

stepotronic/logjamdispatcher

Basic client to dispatch log messages to logjam using ZeroMQ.

  • Tuesday, May 2, 2017
  • by stepotronic
  • Repository
  • 2 Watchers
  • 2 Stars
  • 1,662 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 13 Versions
  • 9 % Grown

The README.md

Logjam Dispatcher

Basic client to dispatch log messages to logjam using ZeroMQ., (*1)

Dispatch Message


use LogjamDispatcher\Dispatcher\ZmqDispatcher; use LogjamDispatcher\Logjam\Message; $dispatcher = new ZmqDispatcher(array('tcp://my.broker'), 'myapp', 'dev'); $message = new Message(); // fill message object $message->setMethod('GET'); //..... $dispatcher->dispatch($message);

Initialize dispatcher with custom ZMQSocket


$dispatcher = new ZmqDispatcher(array('tcp://my.broker'), 'myapp', 'dev', ZmqDispatcher::createZmqSocket());

Filtered Request Informations

use LogjamDispatcher\Http\FilteredRequestInformationDecorator;
use LogjamDispatcher\Http\RequestInformation;

$message = new Message();

// ....

$requestInformation = new RequestInformation();
$requestInformation->setBodyParameters(array(
    'password' => 'foo-bar123'
));

$requestInformation = new FilteredRequestInformationDecorator($requestInformation, array('password'), '*****');

print_r($requestInformation->getBodyParameters());
// outputs: Array([password] => *****)


$message->setRequestInformation($requestInformation);

//....

Fullyfilled Message Example

use LogjamDispatcher\Logjam\Message;
use LogjamDispatcher\Dispatcher\Expression;

$message = new Message();

$requestInformation = new RequestInformation();
$requestInformation
    ->setMethod('GET')
    ->setHeaders(array('Accept' => 'Nothing', 'Feels' => 'BadMan'))
    ->setBodyParameters(array('action' => 'submit'))
    ->setQueryParameters(array('page' => '15', 'offset' => '213123'))
    ->setUrl('my.app.page/products');


$message
    ->setAction('MyApp::MyController#MyAction')
    ->setAdditionalData(array('stuff' => 'theUserDid'))
    ->setCallerAction('') //value of http request header X-Logjam-Action (if present)
    ->setCallerId('')     //value of http request header X-Logjam-Caller-Id (if present)
    ->setDbCalls(12)
    ->setDbTime(123123.123)
    ->setExceptions(array($thisStupidExceptionIGot))
    ->setHost('my.app.host')
    ->setIp('123.321.123.321')
    ->setRequestId(new RequestId())
    ->setRequestInformation($requestInformation)
    ->setRequestStartedAt($myStartTimeDateTimeObject)
    ->setRequestEndedAt($myEndTimeDateTimeObject)
    ->setResponseCode(200)
    ->setSeverity(Expression\Severity::INFO)
    ->setUserId(0);

Log Exceptions

if ($dispatcher->hasExceptions) {
    $exceptions = $dispatcher->getExceptions();
    // Do stuff with them
}

The Versions

02/05 2017

dev-master

9999999-dev

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

The Development Requires

php zeromq logjam

02/05 2017

1.3.0

1.3.0.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

The Development Requires

php zeromq logjam

04/01 2017

1.2.1

1.2.1.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

The Development Requires

php zeromq logjam

04/01 2017

1.2.0

1.2.0.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

The Development Requires

php zeromq logjam

21/11 2016

1.1.1

1.1.1.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

The Development Requires

php zeromq logjam

21/11 2016

1.1.0

1.1.0.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

The Development Requires

php zeromq logjam

22/09 2016

1.0.1

1.0.1.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

php zeromq logjam

22/09 2016

1.0.0

1.0.0.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

php zeromq logjam

07/04 2016

0.3.1

0.3.1.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

php zeromq logjam

13/11 2015

0.3

0.3.0.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

php zeromq logjam

12/10 2015

0.2

0.2.0.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

php zeromq logjam

09/09 2015

0.1.1

0.1.1.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

php zeromq logjam

09/09 2015

0.1

0.1.0.0

Basic client to dispatch log messages to logjam using ZeroMQ.

  Sources   Download

The Requires

  • ext-zmq ~1.1.2@beta

 

php zeromq logjam