July 2017
Beginner to intermediate
340 pages
7h 43m
English
To send logs to Graylog from Python, you can use Graypy (https://github.com/severb/graypy), which converts Python logs to the Graylog Extended Log Format (GELF) (http://docs.graylog.org/en/latest/pages/gelf.html).
Graypy will send the logs via UDP by default, but can also send them via AMQP if you need to be 100% sure that every log makes it to Graylog.
Plugging graypy consists of using the provided handler in place of one of the built-in handlers:
handler = graypy.GELFHandler('localhost', 12201) ...