@digivogt/winston-transport
v1.0.0
Published
Winston transport for Digivogt logging
Maintainers
Readme
@digivogt/winston-transport
Winston transport for sending logs to the Digivogt logging API.
Installation
npm install @digivogt/winston-transportRequires winston (which includes winston-transport) as a peer dependency.
Usage
import winston from "winston";
import DigivogtTransport from "@digivogt/winston-transport";
const logger = winston.createLogger({
transports: [
new DigivogtTransport({
apiKey: "your-api-key",
vogteiId: "your-vogtei-id",
source: "my-app",
}),
],
});Options
| Option | Type | Required | Default | Description |
| ----------------- | ---------- | -------- | -------------------------------- | ---------------------------------------------------- |
| apiKey | string | Yes | | API key for authentication |
| vogteiId | string | Yes | | Vogtei ID to associate logs with |
| source | string | Yes | | Log source identifier (e.g. "api", "worker") |
| endpoint | string | No | https://api.digivogt.com/logs | Logging endpoint URL |
| level | string | No | "info" | Minimum log level |
| ignoredPatterns | string[] | No | ["POST /logs"] | Messages containing these strings are skipped |
The ignoredPatterns option prevents infinite loops when the logging endpoint itself generates log messages.
License
MIT
