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

ActiveLibrary

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 2mo 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 75% 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

2207d 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

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[flowwow/cloudpayments-php-client

cloudpayments api client

2188.2k](/packages/flowwow-cloudpayments-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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