Symfony

Symfony is a high-performance PHP framework for web development.

The tracing and metrics features of AppSignal will work out of the box with the Symfony framework.

Logging

You can configure your logger to send logs to Appsignal.

Monolog

If you are using Monolog, you can add an AppSignal handler to the Monolog handler stack that will send logs to AppSignal.

config/packages/monolog.yaml
monolog: handlers: # other handlers appsignal: type: service id: appsignal.monolog.handler channels: ["app", "event"] # configure which channels to send to AppSignal

After that, add a service definition for 'appsignal.monolog.handler' that uses the Appsignal\Integrations\Monolog\Handler class.

config/services.yaml
services: # ... other services appsignal.monolog.handler: class: Appsignal\Integrations\Monolog\Handler factory: ['Appsignal\Integrations\Monolog\Handler', "withLevel"] arguments: ["info"] # configure log level that will reach AppSignal

Stand-alone logger

You can also use the stand-alone logger and send logs to AppSignal using the Appsignal::log helper method. This method requires no configuration and will send logs only to AppSignal.

PHP
use Appsignal\Appsignal; use Appsignal\Severity; Appsignal::log( message: 'A test log', severity: Severity::INFO, attributes: ['region' => 'eu'], loggerName: 'my-custom-logger', );