Skip to content

Instantly share code, notes, and snippets.

@helios-ag
Created September 8, 2014 05:09
Show Gist options
  • Save helios-ag/a0aea524eac648e1d8d2 to your computer and use it in GitHub Desktop.
Save helios-ag/a0aea524eac648e1d8d2 to your computer and use it in GitHub Desktop.
Monolog loggger configuration for Graylog2 (Symfony2)
services:
gelf.udp.transport:
class: Gelf\Transport\UdpTransport
gelf.publisher:
class: Gelf\Publisher
arguments: [@gelf.udp.transport]
monolog.gelf_handler:
class: Monolog\Handler\GelfHandler
arguments: [@gelf.publisher]
monolog:
handlers:
main:
type: fingers_crossed # or buffer
level: error
handler: gelf
app:
type: buffer
action_level: info
channels: app
handler: gelf
deprecation:
type: buffer
action_level: warning
channels: deprecation
handler: gelf
gelf:
type: service
id: monolog.gelf_handler
level: debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment