composer require errorstream/errorstream-monolog
Next, configure the handler with your api_token and project_token, then push the handler onto monolog. You can find these on the project settings page.
$handler = new ErrorStreamMonologHandler(); $handler->project_token = 'YOUR PROJECT TOKEN'; $handler->api_token = 'YOUR API TOKEN'; $monolog = new Monolog(); $monolog->pushHandler($handler);
That's it! Whenever you log data with monolog it will be sent to our servers.