Skip to content

Instantly share code, notes, and snippets.

@ciarans
Last active March 8, 2022 12:16
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ciarans/d7c71fec9f6b8e52436ada3c496e70d9 to your computer and use it in GitHub Desktop.
Save ciarans/d7c71fec9f6b8e52436ada3c496e70d9 to your computer and use it in GitHub Desktop.
Add Graylog to Laravel
$app->configureMonologUsing(function($monolog) {
$transport = new \Gelf\Transport\UdpTransport("127.0.0.1", 12201, \Gelf\Transport\UdpTransport::CHUNK_SIZE_LAN);
$publisher = new \Gelf\Publisher();
$publisher->addTransport($transport);
$monolog->pushHandler(new \Monolog\Handler\GelfHandler($publisher));
});
@leandroruel
Copy link

no explanations...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment