er1z/monolog-loki-handler

Monolog handler to publish events directly to Loki

0.1-ALPHA 2019-12-29 22:09 UTC

This package is auto-updated.

Last update: 2024-10-29 05:59:25 UTC


README

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