{"repo":"JaniAnttonen/winston-loki","free":true,"listed":false,"github":"https://github.com/JaniAnttonen/winston-loki","clone":"git clone https://github.com/JaniAnttonen/winston-loki.git","description":"Grafana Loki transport for the nodejs logging library Winston.","language":"JavaScript","stars":170,"topics":["winston-loki","grafana-loki","winston-transport","loki","logging"],"license":"MIT","category":"analytics","readme_excerpt":"winston-loki A Grafana Loki transport for the nodejs logging library Winston. Usage This Winston transport is used similarly to other Winston transports. Require winston and define a new LokiTransport() inside its options when creating it. Examples Several usage examples with a test configuration for Grafana+Loki+Promtail reside under examples/ . If you want the simplest possible configuration, that's probably the place to check out. By defining json: true and giving winston-loki the correct host address for Loki is enough for most. Options LokiTransport() takes a Javascript object as an input. These are the options that are available, required in bold : Parameter Description Example Default ------------------ --------------------------------------------------------- ----------------------- ------------- host URL for Grafana Loki http://127.0.0.1:3100 null interval The interval at which batched logs are sent in seconds 30 5 json Use JSON instead of Protobuf for transport true false batching If batching is not used, the logs are sent as they come true true clearOnError Discard any logs that result in an error during transport true false replaceTimestamp Replace any log timestamps with Date.now(). Warning: Disabling replaceTimestamp may result in logs failing to upload due to recent changes in the upstream Loki project. It is recommended to leave this option enabled unless you have a specific reason to disable it. true true labels custom labels, key-value pairs { module: 'http'","default_branch":null,"files":null,"tree":[],"storefront":"/r/JaniAnttonen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JaniAnttonen/winston-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."}