Skip to content

orisai/monolog-logtail

Repository files navigation

Orisai
Monolog Logtail

Monolog handler for Logtail

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

use Monolog\Logger;
use Orisai\MonologLogtail\LogtailClient;
use Orisai\MonologLogtail\LogtailHandler;

$logger = new Logger();
$token = '<YOUR_LOGTAIL_TOKEN>';
$logger->pushHandler(
	new LogtailHandler(
		new LogtailClient($token, /* ... */)
	),
);

$logger->info('Message logged');