PHPackages                             fliglio/logging - 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. fliglio/logging

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

fliglio/logging
===============

2.3.1(6y ago)114.1kGPL-3.0+PHPPHP &gt;=5.6CI failing

Since Oct 21Pushed 5y ago7 watchersCompare

[ Source](https://github.com/fliglio/logging)[ Packagist](https://packagist.org/packages/fliglio/logging)[ RSS](/packages/fliglio-logging/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (3)Versions (12)Used By (0)

[![Build Status](https://camo.githubusercontent.com/37d9b224cfcd0490844e91d2b777de761f37adc9b90e75820db4b2b2779793b1/68747470733a2f2f7472617669732d63692e6f72672f666c69676c696f2f6c6f6767696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fliglio/logging)[![Latest Stable Version](https://camo.githubusercontent.com/74be55d4cfb964a9df841ab5de7d9e47113d6a340ec42c6ca599f9dfcbd9b496/68747470733a2f2f706f7365722e707567782e6f72672f666c69676c696f2f6c6f6767696e672f762f737461626c652e737667)](https://packagist.org/packages/fliglio/logging)

Fliglio.Logging
===============

[](#fligliologging)

Run tests using:

```
$ make test

```

supplies the `\Fliglio\Logging\FLog` trait to add in a psr compatible `log()` method.

Configure with monolog

```
$ composer require monolog/monolog

//index.php
$logger = new Logger("Demo");¬
$handler = new StreamHandler('php://stderr');¬
$logger->pushHandler($handler);¬

FLogRegistry::set(new FLogger($logger , new FLogContext()));

```

Configure with KLogger

```
$ composer require katzgrau/klogger

//index.php
$logger = new \Katzgrau\KLogger\Logger('php://stderr');

FLogRegistry::set(new FLogger($logger , new FLogContext()));

```

Use in a class (with the trait)

```
class Demo {
	use FLog;

	public function __construct() {
		$this->log()->info("hello constructor!");
	}

	public function doATask($taskType) {
		$this->log()->context()->add("taskType", $taskType);
		$this->log()->info("Starting Task");
		foreach (["a", "b", "c", "d"] as $subTask) {
			$this->log()->context()->add("subTask", $subTask);
			$this->log()->info("Starting SubTask");

			try {
				doWork();
				$this->log()->info("SubTask Completed!");
			} catch (\Exception $e) {
				$this->log()->warning("SubtTask Problem!", ["e" => $e]);

			}
		}
		$this->log()->context()->remove("subTask");
		$this->log()->info("SubtTask Completed!");
		$this->log()->context()->remove("taskType");
	}
}

$logger = new \Katzgrau\KLogger\Logger('php://stderr');
$flogger = new FLogger($logger , new FLogContext()));
FLogRegistry::set($flogger);

$flogger->info("Starting...");

$demo = new Demo();
$demo->doATask("Foo");

$flogger->info("Ending...");

```

Output:

```
[2019-10-04 20:25:28.001557] [info] Starting...
[2019-10-04 20:25:28.001606] [info] hello constructor!
[2019-10-04 20:25:28.001641] [info] Starting Task
    taskType: 'Foo'
[2019-10-04 20:25:28.001688] [info] Starting SubTask
    taskType: 'Foo'
    subTask: 'a'
[2019-10-04 20:25:28.001739] [info] SubTask Completed!
    taskType: 'Foo'
    subTask: 'a'
[2019-10-04 20:25:28.001780] [info] Starting SubTask
    taskType: 'Foo'
    subTask: 'b'
[2019-10-04 20:25:28.001821] [info] SubTask Completed!
    taskType: 'Foo'
    subTask: 'b'
[2019-10-04 20:25:28.001862] [info] Starting SubTask
    taskType: 'Foo'
    subTask: 'c'
[2019-10-04 20:25:28.001902] [info] SubTask Completed!
    taskType: 'Foo'
    subTask: 'c'
[2019-10-04 20:25:28.001945] [info] Starting SubTask
    taskType: 'Foo'
    subTask: 'd'
[2019-10-04 20:25:28.001985] [info] SubTask Completed!
    taskType: 'Foo'
    subTask: 'd'
[2019-10-04 20:25:28.002028] [info] SubtTask Completed!
    taskType: 'Foo'
[2019-10-04 20:25:28.002070] [info] Ending...

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 81.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 ~321 days

Total

5

Last Release

2255d ago

PHP version history (2 changes)v2.1.0PHP &gt;=5.3

2.3.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b66bcc04aae61ef3cbc3770b8eb7b8bd5dfb6706e5f71b833c194e429b975fb?d=identicon)[benschw](/maintainers/benschw)

---

Top Contributors

[![benschw](https://avatars.githubusercontent.com/u/98852?v=4)](https://github.com/benschw "benschw (22 commits)")[![philipwhitt](https://avatars.githubusercontent.com/u/5478888?v=4)](https://github.com/philipwhitt "philipwhitt (2 commits)")[![KokeClassic](https://avatars.githubusercontent.com/u/13053819?v=4)](https://github.com/KokeClassic "KokeClassic (1 commits)")[![Mehokm](https://avatars.githubusercontent.com/u/1044781?v=4)](https://github.com/Mehokm "Mehokm (1 commits)")[![sven7777](https://avatars.githubusercontent.com/u/5385519?v=4)](https://github.com/sven7777 "sven7777 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fliglio-logging/health.svg)

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

###  Alternatives

[sentry/sentry

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

1.9k247.1M330](/packages/sentry-sentry)[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k373.5M3.3k](/packages/symfony-cache)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.3M619](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k14](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k49](/packages/ecotone-ecotone)

PHPackages © 2026

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