2017 © Pedro Peláez
 

library zf-log-handler

Interactive Solutions log handler

image

interactive-solutions/zf-log-handler

Interactive Solutions log handler

  • Thursday, June 15, 2017
  • by mac_nibblet
  • Repository
  • 3 Watchers
  • 0 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

zf-log-handler

Utility library to log exception (with stacktrace) and requests/response details to configured adapters., (*1)

Request duration

The duration will be part of the data sent to each adapter if the constant START_TIME is defined. If you wish to log the duration you should define('START_TIME', microtime(true)) before the application is bootstrapped., (*2)

Adapters

All adapters must implement the AdapterInterface, the only provided adapter built into this library is ElasticsearchAdapter which logs data to elasticsearch., (*3)

Options

LogHandlerOptions

Handles general configuration of this library., (*4)

Example config below:, (*5)

LogHandlerOptions::class => [
    'environment'     => 'dev',
    'debug'           => true,
    'adapters'        => [
        ElasticsearchAdapter::class,
    ],
    'alwaysLogRoutes' => [],
],
  • environment is a string that will be added to the data array being logged, useful for easy filtering if logs contains data from several environments
  • debug if set to true will log each incoming request and its corresponding response, if set to false it will disable logging of requests/responses
  • adapters list of adapters implementing the AdapterInterface, each adapter's write method with all data to be logged
  • alwaysLogRoutes list of route names whose request and corresponding response that should always be logged (event if debug is set to false)

ElasticsearchOptions

Handles configuration for the ElasticsearchAdapter., (*6)

Example config below:, (*7)

ElasticsearchOptions::class => [
    'host'     => 'localhost,
    'port'     => <port>,
    'username' => '',
    'password' => '',
    'prefix'   => 'project-name',
],
  • host the elasticsearch host
  • port port of the elasticsearch host
  • username username to log onto elasticsearch
  • password password to log onto elasticsearch
  • prefix the prefix of the index in elasticsearch where data should be logged

The Versions

15/06 2017

dev-master

9999999-dev

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

15/06 2017

0.0.9

0.0.9.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

15/06 2017

dev-add-context

dev-add-context

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

07/06 2017

0.0.8

0.0.8.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

31/05 2017

0.0.7

0.0.7.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

31/05 2017

0.0.6

0.0.6.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

31/05 2017

0.0.5

0.0.5.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

31/05 2017

0.0.4

0.0.4.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

31/05 2017

0.0.3

0.0.3.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

30/05 2017

0.0.2

0.0.2.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson

30/05 2017

0.0.1

0.0.1.0

Interactive Solutions log handler

  Sources   Download

MIT

The Requires

 

by Antoine Hedgecock
by Erik Norgren
by Jonas Eriksson