PHPackages                             cleatsquad/logger - 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. cleatsquad/logger

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

cleatsquad/logger
=================

Custom logger based in monolog

1.1.3(3y ago)311.4k↓33.3%[1 issues](https://github.com/CleatSquad/Logger/issues)MITPHPPHP &gt;=7.4.0

Since Nov 21Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/CleatSquad/Logger)[ Packagist](https://packagist.org/packages/cleatsquad/logger)[ RSS](/packages/cleatsquad-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Custom Logger
=============

[](#custom-logger)

This package allows you to send logs to files. based on [monolog/monolog](https://github.com/Seldaek/monolog). You can use it during your development to make debugging easier. The file are in the var / log folder. This package is recommended for magento 2.

Badges
------

[](#badges)

[![Latest Stable Version](https://camo.githubusercontent.com/292023c54143259cf4437c8f0ce9a296b66c16b0ff7d52cfe69413cf9c428c11/687474703a2f2f706f7365722e707567782e6f72672f636c65617473717561642f6c6f676765722f76)](https://packagist.org/packages/cleatsquad/logger)[![Total Downloads](https://camo.githubusercontent.com/81e56361cfdc9311e8c7b7f7987ee0327fa0df8481a4ffa2232a49b9264b118a/687474703a2f2f706f7365722e707567782e6f72672f636c65617473717561642f6c6f676765722f646f776e6c6f616473)](https://packagist.org/packages/cleatsquad/logger)[![Latest Unstable Version](https://camo.githubusercontent.com/64e522dd9f032c51b0e922275041249b38557b6866b4de16a049bf76c3c4373b/687474703a2f2f706f7365722e707567782e6f72672f636c65617473717561642f6c6f676765722f762f756e737461626c65)](https://packagist.org/packages/cleatsquad/logger)[![License](https://camo.githubusercontent.com/201a03cb9d981deacaba741aa24c45c4be80a014aea55096b991d15b3e2bb341/687474703a2f2f706f7365722e707567782e6f72672f636c65617473717561642f6c6f676765722f6c6963656e7365)](https://packagist.org/packages/cleatsquad/logger)

Getting Started
---------------

[](#getting-started)

### Installing

[](#installing)

Add dependency

```
composer require cleatsquad/logger ^1.1

```

Examples
--------

[](#examples)

You can use it in your php class like this

```
\CleatSquad\Logger::log('Hello!!', 'test.log');
\CleatSquad\Logger::log('Hello!!', 'test.log', \Monolog\Logger::WARNING);
\CleatSquad\Logger::log([22 => 'is an array'], 'test.log');
\CleatSquad\Logger::info(['is an array'], 'test.log');

try {
    throw new \Exception('Error message');
} catch (\Exception $exception) {
    \CleatSquad\Logger::critical($exception);
}
```

From 1.1.2 you can use the magic log method below examples

```
log('Hello!!', 'test.log');
log('Hello!!', 'test.log', \Monolog\Logger::WARNING);
log([22 => 'is an array'], 'test.log');
log(['is an array'], 'test.log', \Monolog\Logger::INFO);

try {
    throw new \Exception('Error message');
} catch (\Exception $exception) {
    log($exception);
}
```

Results
-------

[](#results)

**test.log**

```
[2021-11-21 14:17:44] logger.DEBUG: Hello!! [] []
[2021-11-21 14:17:44] logger.WARNING: Hello!! [] []
[2021-11-21 14:17:44] logger.DEBUG: Array (     [22] => is an array )  [] []
[2021-11-21 14:17:44] logger.INFO: Array (     [0] => is an array )  [] []

```

```
[2021-11-21 14:22:40] logger.CRITICAL: Exception: Error message in /var/www/html/pub/index.php:37 Stack trace: #0 {main} [] []

```

Log Levels
----------

[](#log-levels)

Monolog supports the logging levels described by [RFC 5424](http://tools.ietf.org/html/rfc5424).

- **DEBUG** (100): Detailed debug information.
- **INFO** (200): Interesting events. Examples: User logs in, SQL logs.
- **NOTICE** (250): Normal but significant events.
- **WARNING** (300): Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
- **ERROR** (400): Runtime errors that do not require immediate action but should typically be logged and monitored.
- **CRITICAL** (500): Critical conditions. Example: Application component unavailable, unexpected exception.
- **ALERT** (550): Action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
- **EMERGENCY** (600): Emergency: system is unusable.

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/cleatsquad/logger/tags).

Authors
-------

[](#authors)

- **Mohamed El Mrabet** - *Initial work* - [mimou78](https://github.com/mimou78)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance41

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~260 days

Total

2

Last Release

1379d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75b8cb31786be9b4017a0c617eebe3a0cd3b8d039069ffad5bb5007b5510fd9d?d=identicon)[mimou78](/maintainers/mimou78)

---

Top Contributors

[![mohaelmrabet](https://avatars.githubusercontent.com/u/3817628?v=4)](https://github.com/mohaelmrabet "mohaelmrabet (22 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

loggermagentomonolog

### Embed Badge

![Health badge](/badges/cleatsquad-logger/health.svg)

```
[![Health](https://phpackages.com/badges/cleatsquad-logger/health.svg)](https://phpackages.com/packages/cleatsquad-logger)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k189.7M258](/packages/symfony-monolog-bridge)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M518](/packages/illuminate-log)[honeybadger-io/honeybadger-php

Honeybadger PHP library

381.5M4](/packages/honeybadger-io-honeybadger-php)[graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

2382.6k](/packages/graycore-magento2-stdlogging)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
