https://github.com/devlop/prefixed-logger
PSR-3 wrapper to prefix all messages going into a logger
https://github.com/devlop/prefixed-logger
logging psr-3
Last synced: 9 months ago
JSON representation
PSR-3 wrapper to prefix all messages going into a logger
- Host: GitHub
- URL: https://github.com/devlop/prefixed-logger
- Owner: devlop
- License: mit
- Created: 2021-02-28T06:34:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T08:16:09.000Z (about 5 years ago)
- Last Synced: 2025-06-03T18:38:30.914Z (12 months ago)
- Topics: logging, psr-3
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Prefixed Logger
Wrapper to apply a prefix to all messages going into a logger.
# Installation
```bash
composer require devlop/prefixed-logger
```
# Usage
```
use Devlop\PrefixedLogger\PrefixedLogger;
$logger = new PrefixedLogger('[your prefix] ', $theOriginalLogger);
// then use it as you would use any other logger
$logger->info('something happened'); // '[your prefix] something happened';
```