PHPackages                             monolog/monolog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. monolog/monolog

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

monolog/monolog
===============

Sends your logs to files, sockets, inboxes, databases and various web services

3.10.0(4mo ago)21.4k964.9M—3.6%1.9k[27 issues](https://github.com/Seldaek/monolog/issues)[10 PRs](https://github.com/Seldaek/monolog/pulls)20MITPHPPHP &gt;=8.1CI passing

Since Jul 1Pushed 1mo ago310 watchersCompare

[ Source](https://github.com/Seldaek/monolog)[ Packagist](https://packagist.org/packages/monolog/monolog)[ Docs](https://github.com/Seldaek/monolog)[ GitHub Sponsors](https://github.com/Seldaek)[ Fund](https://tidelift.com/funding/github/packagist/monolog/monolog)[ RSS](/packages/monolog-monolog/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (19)Versions (91)Used By (20)Security (1)

[![Monolog](logo.jpg)](logo.jpg)

Monolog - Logging for PHP [![Continuous Integration](https://github.com/Seldaek/monolog/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/Seldaek/monolog/actions)
==============================================================================================================================================================================================

[](#monolog---logging-for-php-)

[![Total Downloads](https://camo.githubusercontent.com/9334f37bf51b7476f861c5ea51c8f3252d368838b400e1a52a4f5a11d5380bbe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6e6f6c6f672f6d6f6e6f6c6f672e737667)](https://packagist.org/packages/monolog/monolog)[![Latest Stable Version](https://camo.githubusercontent.com/49f6a9be26e072dbd0b5519e11de10b2ec14b49ad72e97d729241aa4badb39c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6e6f6c6f672f6d6f6e6f6c6f672e737667)](https://packagist.org/packages/monolog/monolog)

> **Note** This is the **documentation for Monolog 3.x**, if you are using older releases see the documentation for [Monolog 2.x](https://github.com/Seldaek/monolog/blob/2.x/README.md) or [Monolog 1.x](https://github.com/Seldaek/monolog/blob/1.x/README.md)

Monolog sends your logs to files, sockets, inboxes, databases and various web services. See the complete list of handlers below. Special handlers allow you to build advanced logging strategies.

This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)interface that you can type-hint against in your own libraries to keep a maximum of interoperability. You can also use it in your applications to make sure you can always use another compatible logger at a later time. As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. Internally Monolog still uses its own level scheme since it predates PSR-3.

---

 **Sponsored by:**
 [ ![Better Stack](https://private-user-images.githubusercontent.com/183678/288814555-7de58ce0-2fa2-45c0-b3e8-e60cebb3c4cf.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzkxNjkzNzAsIm5iZiI6MTc3OTE2OTA3MCwicGF0aCI6Ii8xODM2NzgvMjg4ODE0NTU1LTdkZTU4Y2UwLTJmYTItNDVjMC1iM2U4LWU2MGNlYmIzYzRjZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNTE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDUxOVQwNTM3NTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xM2I3NzBmNmZmMDU1Yjk1NTY1N2IxMDJjZjAyODY0ZjkzZTU1MmQ1Y2QxOGEzYTBlYjAwMTdkNGRlY2UyMGVlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.IjADXkVOBOfkn31YZahxzXlqGLHzfl9iwaitK4lWuwU)

 Better Stack lets you centralize, search, and visualize your logs.

 ](https://betterstack.com)
---

Installation
------------

[](#installation)

Install the latest version with

```
composer require monolog/monolog
```

Basic Usage
-----------

[](#basic-usage)

```
