PHPackages                             analog/analog - 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. analog/analog

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

analog/analog
=============

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

1.0.21-stable(2y ago)3451.5M↓14.5%48[1 issues](https://github.com/jbroadway/analog/issues)20MITPHPPHP &gt;=7.2

Since Feb 25Pushed 2y ago23 watchersCompare

[ Source](https://github.com/jbroadway/analog)[ Packagist](https://packagist.org/packages/analog/analog)[ Docs](https://github.com/jbroadway/analog)[ RSS](/packages/analog-analog/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (28)Used By (20)

Analog - Minimal PHP logging library
====================================

[](#analog---minimal-php-logging-library)

[![GitHub Workflow Status](https://camo.githubusercontent.com/0cb71cec75b0c21ab7dac6da0127d06675df3a9df8107b6b80825955ce3b8265/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a62726f61647761792f616e616c6f672f63692e796d6c3f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/0cb71cec75b0c21ab7dac6da0127d06675df3a9df8107b6b80825955ce3b8265/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a62726f61647761792f616e616c6f672f63692e796d6c3f6272616e63683d6d6173746572)[![GitHub](https://camo.githubusercontent.com/5801b140486a8737e8bb1593ded9b7252b05f96842d1f44403844b39a2750ec3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a62726f61647761792f616e616c6f67)](https://camo.githubusercontent.com/5801b140486a8737e8bb1593ded9b7252b05f96842d1f44403844b39a2750ec3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a62726f61647761792f616e616c6f67)[![Packagist Version](https://camo.githubusercontent.com/0af50264e663c455c96192ee50839ce1fe7242fad160fa127dce9c2684dc3a8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e616c6f672f616e616c6f67)](https://camo.githubusercontent.com/0af50264e663c455c96192ee50839ce1fe7242fad160fa127dce9c2684dc3a8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e616c6f672f616e616c6f67)[![Packagist PHP Version Support](https://camo.githubusercontent.com/3855f2685550ad4dcd64d62ef2f71687dfe7fc7eed7c8ade2c0ff6b8699ed489/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616e616c6f672f616e616c6f67)](https://camo.githubusercontent.com/3855f2685550ad4dcd64d62ef2f71687dfe7fc7eed7c8ade2c0ff6b8699ed489/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616e616c6f672f616e616c6f67)[![Packagist Downloads](https://camo.githubusercontent.com/cf2b05a530b80fa11457990379239513f11116ff5c597b17a193840f7d875881/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e616c6f672f616e616c6f67)](https://camo.githubusercontent.com/cf2b05a530b80fa11457990379239513f11116ff5c597b17a193840f7d875881/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e616c6f672f616e616c6f67)

A minimal PHP logging package based on the idea of using closures for configurability and extensibility. It functions as a static class, but you can completely control the writing of log messages through a closure function (aka [anonymous functions](http://ca3.php.net/manual/en/functions.anonymous.php)), or use the `Analog\Logger` wrapper that implements the [PSR-3 specification](https://www.php-fig.org/psr/psr-3/).

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

[](#installation)

Install the latest version with:

```
$ composer require analog/analog
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
