2017 © Pedro Peláez
 

library uniplaces-monolog-extension

logger processors for uniplaces standards

image

uniplaces/uniplaces-monolog-extension

logger processors for uniplaces standards

  • Saturday, December 9, 2017
  • by tiagobrito
  • Repository
  • 19 Watchers
  • 0 Stars
  • 438 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Build Status, (*1)

Uniplaces monolog extension

Package to support logging standards at uniplaces (www.uniplaces.com). The first only define a processor to decorate log with specific fields used to create filters., (*2)

Prerequisites

This package needs php 7.0 or a higher version and is meant to run in a symfony 4 application. Also, is supposed to have composer in the machine where is the project is going to be mounted., (*3)

Installing

To install it locally (for developing purpose) run:, (*4)

$ make setup

In order to use the common processor you have to register it in the service.yaml:, (*5)

    monolog.common_processor:
        class: Uniplaces\Monolog\Processors\CommonProcessor
        arguments:
            - "@request_stack"
            - '%env(APP_ID)%'
            - "%env(GIT_HASH)%"
            - "%kernel.environment%"
        tags:
            - { name: monolog.processor, method: processRecord }

The processor expextes APP_ID and GIT_HASH to be defined in the environment., (*6)

Also define a json formatter in order to be able to add the fields the log must be in json format; because of this you have to register Monolog\Formatter\JsonFormatter optionally you can add a coll to includeStacktraces to add stack trace., (*7)

    monolog.json_formatter:
        class: Monolog\Formatter\JsonFormatter
        calls:
            - [includeStacktraces]

Running the tests

$ make tests

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us., (*8)

Authors

Made with :heart: at uniplaces, (*9)

License

This project is licensed under the MIT License - see the LICENSE.md file for details, (*10)

The Versions

09/12 2017

dev-master

9999999-dev

logger processors for uniplaces standards

  Sources   Download

MIT

The Requires

 

The Development Requires

07/12 2017

1.0.0

1.0.0.0

logger processors for uniplaces standards

  Sources   Download

MIT

The Requires

 

The Development Requires