Monolog
Monolog is the most popular logging library for PHP. You can use Monolog directly to send logs to AppSignal.
Install the Monolog auto-instrumentation package:
Shell
composer require open-telemetry/opentelemetry-logger-monolog
Then add Appsignal\Integrations\Monolog\Handler to Monolog's handler stack.
PHP
use Appsignal\Integrations\Monolog\Handler; use Monolog\Logger; $logger = new Logger('app'); $logger->pushHandler(Handler::withLevel('info')); $logger->info('My log message');
Visit logging documentation to find out more about AppSignal logging capabilities.