PHPackages                             kronos/log - 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. kronos/log

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

kronos/log
==========

PSR-3 compliant logging component

v6.1.0(2mo ago)3286.7k↑102.5%[1 issues](https://github.com/kronostechnologies/kronos-log/issues)MITPHPPHP ^8.4CI passing

Since May 10Pushed 1mo ago25 watchersCompare

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

READMEChangelog (10)Dependencies (10)Versions (71)Used By (0)

kronos-log
==========

[](#kronos-log)

[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) Compliant implementation.

See [php-fig/log](https://github.com/php-fig/log) for more information on root classes and interfaces.

Usage
-----

[](#usage)

```
use Kronos\Log;

$logger = new Log\Logger();

$debug = new Log\Writer\File('/var/log/debug.log', new Kronos\Log\Adaptor\FileFactory());
$logger->addWriter($debug);

...

$logger->info('Need more {drink}', ['drink' => 'coffee']);
```

This is a simple usage of a logger with a writer which output into given files.

It's possible to use multiple writer accepting only some log levels.

```
use Kronos\Log;

$logger = new Log\Logger();
$logger->addContext('user', $current_user);

$debug = new Log\Writer\File('/var/log/debug.log');
$debug->setMaxLevel(\Psr\Log\LogLevel::WARNING);
$logger->addWriter($debug);

$syslog = new Log\Writer\Syslog('application-name');
$syslog->setMinLevel(\Psr\Log\LogLevel::ERROR);
$logger->addWriter($syslog);

...

try {
    $logger->debug('Trying something with {value}', ['value' => $some_variable]);

    // Something
}
catch(\Exception $e) {
    $logger->error('Something did not work', ['exception' => $e]);
}
```

Here the info will be writen in `/var/log/debug.log` while the error will be sent to syslog.

Using the builder
-----------------

[](#using-the-builder)

You can use the builder to quickly create a fully configured logger.

```
$settings = [
	[
		'type' => \Kronos\Log\Enumeration\WriterTypes::FILE,
		'settings' => [
			'filename' => '/var/log/debug.log'
		]
	],
	[
		'type' => \Kronos\Log\Enumeration\WriterTypes::SENTRY,
		'settings' => [
			'minLevel' => \Psr\Log\LogLevel::ERROR,
			'key' => 'kronos',
			'secret' => 'supersecrethash',
			'projectId' => 12345
		]
	],
	[
		'type' => \Kronos\Log\Enumeration\WriterTypes::LOGDNA,
		'settings' => [
			'minLevel' => \Psr\Log\LogLevel::INFO,
			'hostname' => gethostname(),
			'application' => 'app-name',
			'ingestionKey' => 'anothersecrethash'
		]
	]
];

$builder = new \Kronos\Log\Builder();
$logger = $builder->buildFromArray($settings);
```

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance80

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity95

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 76.5% 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 ~56 days

Recently: every ~96 days

Total

64

Last Release

82d ago

Major Versions

1.3.0 → 2.0.02018-03-27

v2.3.0 → v3.0.02019-03-22

v3.8.0 → v4.0.02022-11-22

v4.1.0 → v5.0.02023-04-28

v5.4.1 → v6.0.02025-09-30

PHP version history (8 changes)0.1.0PHP ^5.5

2.0.0PHP ^5.6

v2.2.3PHP &gt;=5.6

v3.0.0PHP &gt;=7.2

v3.5.0PHP ^7.4 || ^8.1

v4.0.0PHP ^8.1

v5.3.0PHP ^8.3

v6.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/70e2f4ac35b1164e0b25f0121521a4f0c2dccbbe380899ca2a35341e84008067?d=identicon)[jbreton](/maintainers/jbreton)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (319 commits)")[![GTony](https://avatars.githubusercontent.com/u/6396422?v=4)](https://github.com/GTony "GTony (28 commits)")[![jbreton](https://avatars.githubusercontent.com/u/617954?v=4)](https://github.com/jbreton "jbreton (20 commits)")[![etremblay](https://avatars.githubusercontent.com/u/617714?v=4)](https://github.com/etremblay "etremblay (14 commits)")[![vlemieux](https://avatars.githubusercontent.com/u/7091975?v=4)](https://github.com/vlemieux "vlemieux (8 commits)")[![nvanheuverzwijn](https://avatars.githubusercontent.com/u/943226?v=4)](https://github.com/nvanheuverzwijn "nvanheuverzwijn (6 commits)")[![meriouma](https://avatars.githubusercontent.com/u/1082552?v=4)](https://github.com/meriouma "meriouma (6 commits)")[![mdastous](https://avatars.githubusercontent.com/u/39062062?v=4)](https://github.com/mdastous "mdastous (4 commits)")[![alexbrillant](https://avatars.githubusercontent.com/u/19400226?v=4)](https://github.com/alexbrillant "alexbrillant (3 commits)")[![antoinedeschenes](https://avatars.githubusercontent.com/u/6216119?v=4)](https://github.com/antoinedeschenes "antoinedeschenes (3 commits)")[![pylafleur](https://avatars.githubusercontent.com/u/1416333?v=4)](https://github.com/pylafleur "pylafleur (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![paulmillette-equisoft](https://avatars.githubusercontent.com/u/114004870?v=4)](https://github.com/paulmillette-equisoft "paulmillette-equisoft (1 commits)")[![faroukhoumaidi](https://avatars.githubusercontent.com/u/96442116?v=4)](https://github.com/faroukhoumaidi "faroukhoumaidi (1 commits)")[![Chris-V](https://avatars.githubusercontent.com/u/1116964?v=4)](https://github.com/Chris-V "Chris-V (1 commits)")

---

Tags

psrlogloggingkronos

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kronos-log/health.svg)

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

###  Alternatives

[monolog/monolog

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

21.4k964.9M7.0k](/packages/monolog-monolog)[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[analog/analog

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

3451.5M24](/packages/analog-analog)[apix/log

Minimalist, thin and fast PSR-3 compliant (multi-bucket) logger.

511.0M18](/packages/apix-log)[league/tactician-logger

Adds PSR-3 logging support to the Tactician command bus

649.6M9](/packages/league-tactician-logger)

PHPackages © 2026

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