https://github.com/amphp/log
Non-blocking logging for PHP based on Amp and Monolog.
https://github.com/amphp/log
amphp logging php psr-3
Last synced: 9 months ago
JSON representation
Non-blocking logging for PHP based on Amp and Monolog.
- Host: GitHub
- URL: https://github.com/amphp/log
- Owner: amphp
- License: mit
- Created: 2018-03-18T21:47:43.000Z (almost 8 years ago)
- Default Branch: 2.x
- Last Pushed: 2023-08-05T19:04:16.000Z (over 2 years ago)
- Last Synced: 2025-04-20T15:45:57.768Z (9 months ago)
- Topics: amphp, logging, php, psr-3
- Language: PHP
- Homepage:
- Size: 47.9 KB
- Stars: 38
- Watchers: 8
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# amphp/log
AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.
`amphp/log` provides a non-blocking stream handler for `monolog/monolog`.
[](https://github.com/amphp/log/releases)

## Installation
This package can be installed as a [Composer](https://getcomposer.org/) dependency.
```bash
composer require amphp/log
```
## Usage
```php
setFormatter(new ConsoleFormatter);
$logger = new Logger('main');
$logger->pushHandler($handler);
$logger->debug("Hello, world!");
$logger->info("Hello, world!");
$logger->notice("Hello, world!");
$logger->error("Hello, world!");
$logger->alert("Hello, world!");
```