An open API service indexing awesome lists of open source software.

https://github.com/webmafia/fluentlog-php

Fast, structured logging for PHP that implemented the Fluent Forward protocol
https://github.com/webmafia/fluentlog-php

fluentbit fluentd log php

Last synced: 5 months ago
JSON representation

Fast, structured logging for PHP that implemented the Fluent Forward protocol

Awesome Lists containing this project

README

          

# fluentlog-php
This is a PHP version of [Fluentlog](https://github.com/webmafia/fluentlog), with three important differences:
1. Writing logs is not asynchronous.
2. Written logs are not buffered.
3. Written logs are not retried.

For this reason it's highly recommended to write to a local log collector (preferably [FluentBit](https://fluentbit.io/)).

## Installation
```sh
composer require webmafia/fluentlog
```

## Usage example
```php
info('hello from php %d', $i) . "\n";
}

$end = microtime(true);
$dur = $end - $start;
echo 'Done in ' . $dur . ' seconds' . "\n";
```