Download the PHP package sjs/hermod without Composer
On this page you can find all versions of the php package sjs/hermod. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package hermod
Hermod
Simple pre-configured Grafana Loki logging and exception handling for Neos
📦 Packagist • Quick Start • Functionality
Quick Start
[!IMPORTANT]
This package pre-configures the Neos FlowsystemLoggerandsecurityLoggeras well as theexceptionHandler.
Just add these environment variables and you are good to go:
LOKI_URI: the URL to your Loki instanceLOKI_USER: UsernameLOKI_TOKEN: Access Token
Functionality
Logging Backend
A buffered logging backend.
Class: SJS\Hermod\Log\Backend\LokiBackend
Options
| key | type | description | |
|---|---|---|---|
| severityThreshold | string | ||
| url | string | url to your Loki instance. Port included | |
| user | string | Username | |
| token | string | Access token | |
| maxBufferSize | number | How many logs should be buffered until they get sent to Loki | |
| labels | array | optional | key value pair of static labels |
| fallbackFile | string | optional | Path to a file to log the streams if Loki is not reachable |
Example
Configuration/Settings.Neos.Flow.yaml
Exception Handling
Production Class: SJS\Hermod\Handler\ProductionExceptionHandler
Debug Class: SJS\Hermod\Handler\DebugExceptionHandler
Options
The exception handling is split into two parts. The Exception Handler uses the Exception Service to send the data to Hermod.
Exception Service
| key | type | description | |
|---|---|---|---|
| url | string | url to your Hermod instance. Port included | |
| user | string | Username | |
| token | string | Access token | |
| labels | array | optional | key value pair of static labels |
| fallbackFile | string | optional | Path to a file to log the streams if Loki is not reachable |
Exception Handler
| key | type | description | |
|---|---|---|---|
| lokiIgnoreException | bool | optional | Should the exception be ignored. |
Example
Configuration/Settings.SJS.Hermod.yaml
Configuration/Settings.Neos.Flow.yaml
[!NOTE] The exception handling is based on Networkteam.SentryClient