<?php

require_once 'vendor/autoload.php';

use Gelf\Transport;
use Monolog\Level;
use Monolog\Logger;
use Monolog\Handler\GelfHandler;

// Create the logger
$logger = new Logger('test_logger');

// Create Graylog GELF TCP transport
$transport = new Gelf\Transport\TcpTransport("10.0.0.112",12201);

// Create GELF handler
$handler = new GelfHandler(new Gelf\Publisher($transport));

// Now add GELF handler to logger
$logger->pushHandler($handler);

// You can now use your logger
$logger->info('My logger is now ready');

