devlop/prefixed-logger

PSR-3 wrapper to prefix all messages going into a logger

1.0.1 2021-03-05 08:15 UTC

This package is auto-updated.

Last update: 2024-12-05 16:31:28 UTC


README

Latest Stable Version License

Prefixed Logger

Wrapper to apply a prefix to all messages going into a logger.

Installation

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';