UNPKG

nestjs-loki-logger

Version:

A Nest Js module to push logs to grafana loki extending the built-in nest js Logger Class.

19 lines (18 loc) 918 B
import { Logger } from '@nestjs/common'; import { NestLokiModuleOptions } from './typings/nest-loki'; export declare class LokiLogger extends Logger { protected context?: string; constructor(context?: string); static lokiUrl: string; static defaultLabels: any; static logToConsole: boolean; static gzip: boolean; static onLokiError: (error: any) => void; private static sendLokiRequest; static forRoot(options: NestLokiModuleOptions): any; error(message: string, trace?: string, context?: string, labels?: Record<string, string>): void; log(message: string, context?: string, labels?: Record<string, string>): void; warn(message: string, context?: string, labels?: Record<string, string>): void; debug(message: string, context?: string, labels?: Record<string, string>): void; verbose(message: string, context?: string, labels?: Record<string, string>): void; }