@axiomhq/winston
Version:
The official Axiom transport for winston logger
37 lines • 1.21 kB
TypeScript
/// <reference types="node" />
import Transport, { TransportStreamOptions } from 'winston-transport';
import { AxiomWithoutBatching } from '@axiomhq/js';
export interface WinstonOptions extends TransportStreamOptions {
dataset?: string;
token: string;
orgId?: string;
url?: string;
/**
* The Axiom edge domain for ingestion.
* Specify just the domain without scheme (https:// is added automatically).
*
* @example "eu-central-1.aws.edge.axiom.co"
*/
edge?: string;
/**
* The Axiom edge URL for ingestion.
* Specify the full URL with scheme.
* Takes precedence over `edge` if both are set.
*
* @example "https://eu-central-1.aws.edge.axiom.co"
*/
edgeUrl?: string;
onError?: (err: Error) => void;
}
export declare class WinstonTransport extends Transport {
client: AxiomWithoutBatching;
dataset: string;
batch: object[];
batchCallback: (err: Error | null) => void;
batchTimeoutId?: NodeJS.Timeout;
constructor(opts: WinstonOptions);
log(info: any, callback: () => void): void;
private request;
flush(callback?: (err: Error | null) => void): void;
}
//# sourceMappingURL=index.d.ts.map