Giter Site home page Giter Site logo

monolog-http / monolog-http Goto Github PK

View Code? Open in Web Editor NEW
38.0 6.0 1.0 2.38 MB

A collection of monolog handlers that use a PSR-18 HTTP Client to send your logs

License: MIT License

PHP 99.70% Makefile 0.30%
php psr3 psr17 psr18 monolog monolog-handler http-client log logging gitlab mattermost sendgrid cube slack telegram monolog-handlers monolog-http

monolog-http's Introduction

monolog-http

Software License Build Status

A collection of monolog handlers that use PSR-18 HTTP Client in order to send logs to various systems.

Why

By leveraging the PSR-18 the developers are now able to choose the transport layer they want and customize it according to their needs (see here).

Install

Via Composer

$ composer require monolog-http/monolog-http

Changelog

Please see CHANGELOG for more information on what has changed recently.

Testing

$ make phpunit

Contributing

Contributions are welcome.

Please check our issue if you want to help.

Credits

License

The MIT License (MIT). Please see License File for more information.

monolog-http's People

Contributors

gmponos avatar savvasal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tomkyle

monolog-http's Issues

Sendgrid Handler

We can use an HTTP client to send to sendgrid logs instead of mailing them

Add PHP 8 support?

Support for PHP 8 should be added.

Cloning and installing under PHP 8 fails due to PHP ^7.2 version contraints of this package and the guzzlehttp/psr7@dev-master package required for development.

A fast shot allowing for ^7.2|^8.0 and modernizing to latest guzzlehttp/psr7@^1.7 will, however, break the unit tests as class GuzzleHttp\Psr7\HttpFactory seems to have disappeared (it's not in their 1.x branches at least).

As a workaround one can use nyholm/psr7; usage in unit tests then basically goes like this:

<?php
namespace MonologHttp\Tests\Unit\Twilio;

- use GuzzleHttp\Psr7\HttpFactory;
+ use Nyholm\Psr7\Factory\Psr17Factory;

return new TwilioHandler(
    $this->httpClient,
-   new HttpFactory(),
+   new Psr17Factory(),
    'sid',
    'secret',
    '+35790909090',
    '+306988008000'
);

See my fork: https://github.com/tomkyle/monolog-http
If this is considered useful, I'd happily contribute PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.