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

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

czproject/logger
================

Output logger.

v1.0.0(1y ago)35.5k2BSD-3-ClausePHPPHP 8.0 - 8.4CI passing

Since Sep 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/czproject/logger)[ Packagist](https://packagist.org/packages/czproject/logger)[ Fund](https://www.janpecha.cz/donate/)[ RSS](/packages/czproject-logger/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (6)Used By (2)

CzProject\\Logger
=================

[](#czprojectlogger)

[![Build Status](https://github.com/czproject/logger/workflows/Build/badge.svg)](https://github.com/czproject/logger/actions)[![Downloads this Month](https://camo.githubusercontent.com/bbd076bb5b442d296632536476c91203877f3501f7937bc41f2f87028e563710/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f637a70726f6a6563742f6c6f676765722e737667)](https://packagist.org/packages/czproject/logger)[![Latest Stable Version](https://camo.githubusercontent.com/e214c6624c2739f98ba746bd6efcacfa895de3d264d50739c64d2ad476cab110/68747470733a2f2f706f7365722e707567782e6f72672f637a70726f6a6563742f6c6f676765722f762f737461626c65)](https://github.com/czproject/logger/releases)[![License](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://github.com/czproject/logger/blob/master/license.md)

[![Donate](https://camo.githubusercontent.com/101b981194f1dafbf9c42e19c3034fe2d724e75be972cef0f4477074997834db/68747470733a2f2f6275796d65636f666665652e696e746d2e6f72672f696d672f646f6e6174652d62616e6e65722e76312e737667)](https://www.janpecha.cz/donate/)

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

[](#installation)

[Download a latest package](https://github.com/czproject/logger/releases) or use [Composer](http://getcomposer.org/):

```
composer require czproject/logger

```

CzProject\\Logger requires PHP 8.0 or later.

Usage
-----

[](#usage)

```
use CzProject\Logger;
use CzProject\Logger\ILogger;

$logger = new Logger\OutputLogger(ILogger::DEBUG); // minimal level
$logger->log('Debug info', ILogger::DEBUG);
$logger->log('Output', ILogger::INFO);
$logger->log('Done!', ILogger::SUCCESS);
$logger->log('Warning...', ILogger::WARNING);
$logger->log('Error message', ILogger::ERROR);
$logger->log('Exception message', ILogger::EXCEPTION);
$logger->log('App crashed.', ILogger::CRITICAL);
```

### Loggers

[](#loggers)

- `CzProject\Logger\CliLogger($level, $colored = NULL)` - sends messages to CLI STDOUT
- `CzProject\Logger\OutputLogger($level)` - prints messages to STDOUT
- `CzProject\Logger\FileLogger($path, $level)` - saves messages into new created file
- `CzProject\Logger\MemoryLogger($level)` - saves messages into memory, you can use `$memoryLogger->getLog()`
- `CzProject\Logger\MultiLogger()` - sends messages to other loggers

```
$logger = new Logger\MultiLogger;
$logger->addLogger(new Logger\OutputLogger(ILogger::INFO));
$logger->addLogger(new Logger\FileLogger(__DIR__ . '/debug.log', ILogger::DEBUG));

$logger->log($msg, $level);
```

### LoggerProxy

[](#loggerproxy)

LoggerProxy is interface for using of Logger.

```
$logger = new Logger\OutputLogger(ILogger::DEBUG); // minimal level
$proxy = new Logger\LoggerProxy($logger);
$proxy->debug('Debug info');
$proxy->log('Output'); // or $proxy->info()
$proxy->success('Done!');
$proxy->warning('Warning...', ILogger::WARNING);
$proxy->error('Error message', ILogger::ERROR);
$proxy->exception('Exception message', ILogger::EXCEPTION);
$proxy->critical('App crashed.', ILogger::CRITICAL);
```

---

License: [New BSD License](license.md)
Author: Jan Pecha,

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance48

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% 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 ~709 days

Total

5

Last Release

389d ago

Major Versions

v0.12.0 → v1.0.02025-06-10

PHP version history (3 changes)v0.9.0PHP &gt;=5.4.0

v0.12.0PHP &gt;=5.6.0

v1.0.0PHP 8.0 - 8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c980b1511b4a0350442dc23d89c99d4d9a2411b7e765d52c133ccacf616968b?d=identicon)[janpecha](/maintainers/janpecha)

---

Top Contributors

[![janpecha](https://avatars.githubusercontent.com/u/637719?v=4)](https://github.com/janpecha "janpecha (26 commits)")

---

Tags

loggerloggingphp

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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