You are here

function monolog_gelf_handler_loader in Monolog 7

Same name and namespace in other branches
  1. 6 handlers/gelf.inc \monolog_gelf_handler_loader()

Monolog loader callback; Loads a GelfHandler handler.

Return value

HandlerInterface

File

handlers/gelf.inc, line 17
Handler include for FirePHPHandler.

Code

function monolog_gelf_handler_loader($options) {
  $publisher = new Publisher();
  $publisher
    ->addTransport(new UdpTransport($options['hostname'], $options['port'], $options['chunk_size']));
  return new GelfHandler($publisher, $options['level'], $options['bubble']);
}