Overview
@saflib/vendors-loki adds a Grafana Loki Winston transport for shipping operational logs from @saflib/node services.
What this package provides
addLokiTransport()— registers awinston-lokitransport on the processloglogger with JSON formatting andservice_namelabels
Integration
Call addLokiTransport() during service bootstrap after setServiceName and alongside other addTransport calls. If hostname/port are unset, logs a warning and skips Loki (local dev continues with the dev log buffer only).
Environment (see env.schema.json):
LOKI_HOSTNAME— Loki host (e.g.loki)LOKI_PORT— Loki port (e.g.3100)
Development log viewing uses @saflib/node-log; Loki is for production log aggregation.