PHPackages                             sjs/hermod - 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. sjs/hermod

ActiveNeos-package

sjs/hermod
==========

v0.2.1(1y ago)04AGPL-3.0-or-laterPHP

Since Aug 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sjsone/SJS.Hermod)[ Packagist](https://packagist.org/packages/sjs/hermod)[ RSS](/packages/sjs-hermod/feed)WikiDiscussions main Synced 1mo ago

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

 Hermod
========

[](#--hermod)

#### Simple pre-configured Grafana Loki logging and exception handling for Neos

[](#simple-pre-configured-grafana-loki-logging-and-exception-handling-for-neos)

 [📦 Packagist](https://packagist.org/packages/sjs/hermod) • [Quick Start](#quick-start) • [Functionality](#Functionality)

Quick Start
-----------

[](#quick-start)

Important

This package pre-configures the Neos Flow `systemLogger` and `securityLogger` as well as the `exceptionHandler`.

Just add these environment variables and you are good to go:

- **`LOKI_URI`**: the URL to your Loki instance
- **`LOKI_USER`**: Username
- **`LOKI_TOKEN`**: Access Token

Functionality
-------------

[](#functionality)

### Logging Backend

[](#logging-backend)

A buffered logging backend.

**Class:** `SJS\Hermod\Log\Backend\LokiBackend`

#### Options

[](#options)

keytypedescriptionseverityThresholdstringurlstringurl to your Loki instance. Port includeduserstringUsernametokenstringAccess tokenmaxBufferSizenumberHow many logs should be buffered until they get sent to Lokilabelsarray*optional*key value pair of static labelsfallbackFilestring*optional*Path to a file to log the streams if Loki is not reachable#### Example

[](#example)

*`Configuration/Settings.Neos.Flow.yaml`*

```
Neos:
  Flow:
    log:
      psr3:
        'Neos\Flow\Log\PsrLoggerFactory':
          systemLogger:
            default:
              class: SJS\Hermod\Log\Backend\LokiBackend
              options:
                severityThreshold: "%LOG_DEBUG%"
                url: "%env:LOKI_URI%"
                user: "%env:LOKI_USER%"
                token: "%env:LOKI_TOKEN%"
                maxBufferSize: 300
                labels:
                  target: systemLogger
```

### Exception Handling

[](#exception-handling)

**Production Class**: `SJS\Hermod\Handler\ProductionExceptionHandler`

**Debug Class**: `SJS\Hermod\Handler\DebugExceptionHandler`

#### Options

[](#options-1)

The exception handling is split into two parts. The Exception Handler uses the Exception Service to send the data to Hermod.

##### Exception Service

[](#exception-service)

keytypedescriptionurlstringurl to your Hermod instance. Port includeduserstringUsernametokenstringAccess tokenlabelsarray*optional*key value pair of static labelsfallbackFilestring*optional*Path to a file to log the streams if Loki is not reachable##### Exception Handler

[](#exception-handler)

keytypedescriptionlokiIgnoreExceptionbool*optional*Should the exception be ignored.#### Example

[](#example-1)

*`Configuration/Settings.SJS.Hermod.yaml`*

```
SJS:
  Hermod:
    exceptionService:
      url: "%env:LOKI_URI%"
      user: "%env:LOKI_USER%"
      token: "%env:LOKI_TOKEN%"
      fallbackFile: "%FLOW_PATH_DATA%Logs/loki.log.exceptionService.jsonl"
      labels:
        target: exception
```

*`Configuration/Settings.Neos.Flow.yaml`*

```
Neos:
  Flow:
    error:
      exceptionHandler:
        className: SJS\Hermod\Handler\ProductionExceptionHandler

        defaultRenderingOptions:
          lokiIgnoreException: false

        renderingGroups:
          authenticationRequiredExceptions:
            matchingStatusCodes: [401]
            options:
              lokiIgnoreException: true

          accessDeniedExceptions:
            matchingStatusCodes: [403]
            options:
              lokiIgnoreException: true
```

Note

The exception handling is based on [Networkteam.SentryClient](https://github.com/networkteam/Networkteam.SentryClient)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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 ~0 days

Total

2

Last Release

639d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2229ac36a196d4d72de5bd2d2a773f5149a6751001465d6044bd7f90f2c5f73d?d=identicon)[sjsone](/maintainers/sjsone)

---

Top Contributors

[![sjsone](https://avatars.githubusercontent.com/u/87149727?v=4)](https://github.com/sjsone "sjsone (39 commits)")

---

Tags

grafana-lokigrafana-loki-clientlokineos-cmsneoscms

### Embed Badge

![Health badge](/badges/sjs-hermod/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[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)
