> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Symfony

[Symfony](https://symfony.com) 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](https://symfony.com/doc/current/logging.html#handlers-writing-logs-to-different-locations) that will send logs to AppSignal.

```yml title="config/packages/monolog.yaml" theme={null}
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.

```yml title="config/services.yaml" theme={null}
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 PHP theme={null}
use Appsignal\Appsignal;
use Appsignal\Severity;

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