Seldaek/monolog ? reverse-engineered prompt
Reverse engineered prompt
Build me a PHP logging library like Monolog that I can drop into an app and use right away.
I want to create named loggers, send messages at different severity levels, and plug in different outputs like a file, console, socket, database, or web service. It should follow the common PSR 3 logger interface so it works cleanly with other PHP tools and frameworks. Please include a simple way to add one or more handlers, format log messages nicely, and support extra processors for things like request data or custom context.
Make sure it works with modern PHP 8.1 and up, include a few practical examples, and add tests so the basic logging behavior is covered. If you need to check any current PSR 3 or PHP logging details, look them up online first.
Are you gonna build this?
make sure you review the code using coderabbit