er1z / monolog-loki-handler

Monolog handler to publish events directly to Loki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

monolog-loki-handler

Monolog handler to publish events directly to Loki.

examples

See examples directory.

how messages are formatted

  • Context variables are parsed to logfmt, eg. logging message with ['var'=>'val'] will produce message var=val, any non-scalar values are JSON-encoded,
  • Labels for Loki are defined by extra fields.

default labels:

  • channel
  • level
  • level_name

About

Monolog handler to publish events directly to Loki

License:MIT License


Languages

Language:PHP 100.0%