PHP code example of elementary / graylog-udp
1. Go to this page and download the library: Download elementary/graylog-udp library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
elementary / graylog-udp example snippets
use elementary\logger\graylog\udp\GraylogUdp;
$ex = new GraylogUdp('TestFacility', 'TestHost', 12201);
$ex->info('TestMessage', ['clientIp' => '127.0.0.1']);