{"repo":"Julien-R44/pino-loki","free":true,"listed":false,"github":"https://github.com/Julien-R44/pino-loki","clone":"git clone https://github.com/Julien-R44/pino-loki.git","description":"🔉 This package provides a transport for pino that forwards messages to Loki.","language":"TypeScript","stars":167,"topics":["pino","loki","grafana","logging"],"license":"MIT","category":"analytics","readme_excerpt":"This module provides a transport for pino that forwards messages to a Loki instance. Why pino-loki Pino-loki is based upon the highly performant logging library pino. Loki usually gets the logs through Grafana Agent which reads system logs from files. This setup may not always be possible or require additional infrastructure, especially in situations where logs are gathered application code deployed as a SaaS in the cloud. Pino-loki sends the pino logs directly to Loki. Pino-loki is for Pino v7.0.0 and above, so the module can be configured to operate in a worker thread, which is the recommended way to use it. Usage In a worker thread In main process See the example Library options labels Additional labels to be added to all Loki logs. This can be used to add additional context to all logs, such as the application name, environment, etc. propsToLabels A list of properties to be converted to loki labels. levelMap A map of pino log levels to Loki log levels. This can be used to map pino log levels to different Loki log levels. This is the default map. Left is pino log level, right is Loki log level. host The URL for Loki. This is required. endpoint The path to the Loki push API. Defaults to /loki/api/v1/push . basicAuth Basic auth credentials for Loki. An object with the following shape: headers A list of headers to be sent to Loki. This can be useful for adding the X-Scope-OrgID header for Grafana Cloud Loki : timeout A max timeout in miliseconds when sending logs to Loki. Def","default_branch":null,"files":null,"tree":[],"storefront":"/r/Julien-R44","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Julien-R44/pino-loki/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}