Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/repejota/monolog-nats
A Monolog NATS handler.
https://github.com/repejota/monolog-nats
handler log message monolog nats php
Last synced: about 5 hours ago
JSON representation
A Monolog NATS handler.
- Host: GitHub
- URL: https://github.com/repejota/monolog-nats
- Owner: repejota
- License: mit
- Created: 2017-07-06T23:00:49.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-05-26T13:10:37.000Z (over 6 years ago)
- Last Synced: 2024-04-19T08:20:33.598Z (7 months ago)
- Topics: handler, log, message, monolog, nats, php
- Language: PHP
- Size: 187 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Monolog NATS
Monolog handler for sending logs to NATS (http://nats.io). Useful for async recording those logs on another machine.
* Develop [![CircleCI](https://circleci.com/gh/repejota/monolog-nats/tree/develop.svg?style=svg)](https://circleci.com/gh/repejota/monolog-nats/tree/develop)
* Master [![CircleCI](https://circleci.com/gh/repejota/monolog-nats/tree/master.svg?style=svg)](https://circleci.com/gh/repejota/monolog-nats/tree/master)* Coverage [![Coverage Status](https://coveralls.io/repos/github/repejota/monolog-nats/badge.svg)](https://coveralls.io/github/repejota/monolog-nats)
## Install
```bash
composer require repejota/monolog-nats
```This will install this package itself [Monolog](https://packagist.org/packages/monolog/monolog)
and [PHPNAts](https://github.com/repejota/phpnats), if they are not yet installed.## Example
```php
connect();$logger = new Logger("monolog-nats-logger");
$natsHandler = new NatsHandler($nats);
$logger->pushHandler($natsHandler);$logger->info("Info log");
```