PHPackages                             facile-it/psalm-psr-log-plugin - 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. facile-it/psalm-psr-log-plugin

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

facile-it/psalm-psr-log-plugin
==============================

Psalm plugin for psr/log (PSR-3)

0.1.3(1y ago)0311↓100%MITPHPPHP ^7.4 || ^8.0CI passing

Since Jun 14Pushed 1y ago3 watchersCompare

[ Source](https://github.com/facile-it/psalm-psr-log-plugin)[ Packagist](https://packagist.org/packages/facile-it/psalm-psr-log-plugin)[ RSS](/packages/facile-it-psalm-psr-log-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

psalm-psr-log-plugin
====================

[](#psalm-psr-log-plugin)

[![Latest Stable Version](https://camo.githubusercontent.com/7d264e6d2892ea1d0b6a0d791acac2a069a4cff7ee701defecbc9f6f6fc16f37/687474703a2f2f706f7365722e707567782e6f72672f666163696c652d69742f7073616c6d2d7073722d6c6f672d706c7567696e2f76)](https://packagist.org/packages/facile-it/psalm-psr-log-plugin)[![Total Downloads](https://camo.githubusercontent.com/1656cf471a0df816e6a7f3e1592f292460eee68e1404905fd01bea241365ed52/687474703a2f2f706f7365722e707567782e6f72672f666163696c652d69742f7073616c6d2d7073722d6c6f672d706c7567696e2f646f776e6c6f616473)](https://packagist.org/packages/facile-it/psalm-psr-log-plugin)[![Latest Unstable Version](https://camo.githubusercontent.com/7440bdfdb09d370544cb493941e35ab0ce75c896bf2461706ffa6579b3e8cca1/687474703a2f2f706f7365722e707567782e6f72672f666163696c652d69742f7073616c6d2d7073722d6c6f672d706c7567696e2f762f756e737461626c65)](https://packagist.org/packages/facile-it/psalm-psr-log-plugin)[![License](https://camo.githubusercontent.com/8ea467e0a0ac971d00eccecc5e77dbaba0fd29bd6f43b513140304c48dab96af/687474703a2f2f706f7365722e707567782e6f72672f666163696c652d69742f7073616c6d2d7073722d6c6f672d706c7567696e2f6c6963656e7365)](https://packagist.org/packages/facile-it/psalm-psr-log-plugin)

A Psalm plugin to check psr/log (PSR-3) usage.

Features
--------

[](#features)

- Suppress `ImplicitToStringCast` psalm errors when objects with a `__toString()` method are used as message
- Checks that all placeholders used in a message string are in the context array

Example
-------

[](#example)

This plugin checks for missing context keys for placeholders:

```
/** @var Psr\Log\LoggerInterface $logger */

$logger->info('User {username} logged in at {datetime}', [
    'username' => 'user-username',
]);
```

[![Psalm Error Screenshot](https://raw.githubusercontent.com/facile-it/psalm-psr-log-plugin/master/docs/images/psalm_error1.png)](https://raw.githubusercontent.com/facile-it/psalm-psr-log-plugin/master/docs/images/psalm_error1.png)

Usage
-----

[](#usage)

Include the plugin in your `psalm.xml` config file.

```

```

### Required keys

[](#required-keys)

if you want to always require keys in context, you can configure the plugin with the `requiredKey`:

```

            requestId
            environment

```

### Ignored keys

[](#ignored-keys)

if you want to ignore requirement for some key in context, you can configure the plugin with the `ignoredKey`.

This is useful when you have your logger that automatically injects it.

```

            requestId

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance44

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.3% 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 ~449 days

Total

4

Last Release

444d ago

PHP version history (2 changes)0.1.0PHP ^7.2 || ^8.0

0.1.3PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6fa237583695920bbe285e738810728bfd7981ab066d39ffe852e09ae1fd30e?d=identicon)[thomasvargiu](/maintainers/thomasvargiu)

---

Top Contributors

[![thomasvargiu](https://avatars.githubusercontent.com/u/732012?v=4)](https://github.com/thomasvargiu "thomasvargiu (18 commits)")[![Jean85](https://avatars.githubusercontent.com/u/6729988?v=4)](https://github.com/Jean85 "Jean85 (10 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/facile-it-psalm-psr-log-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/facile-it-psalm-psr-log-plugin/health.svg)](https://phpackages.com/packages/facile-it-psalm-psr-log-plugin)
```

###  Alternatives

[sentry/sentry

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

1.9k227.1M273](/packages/sentry-sentry)[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)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2222.9M248](/packages/open-telemetry-sdk)[open-telemetry/api

API for OpenTelemetry PHP.

1833.0M214](/packages/open-telemetry-api)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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