@mdf.js/logger
Version:
MMS - API Logger - Enhanced logger library for mms artifacts
40 lines • 1.57 kB
TypeScript
import { Options, support } from 'fluent-logger';
import Joi from 'joi';
import { Logger } from '../logger';
import { LogLevel } from '../types';
/** Winston Fluentd transport instance interface */
type FluentTransportInterface = typeof support.winstonTransport;
/** Fluentd transport configuration */
export type FluentdTransportConfig = Exclude<Options, 'internalLogger'> & {
/** Fluentd transport enabled, default: false */
enabled?: boolean;
/** Fluentd log level, default: info */
level?: LogLevel;
};
/** File transport validation schema */
export declare const FluentdTransportSchema: Joi.ObjectSchema<FluentdTransportConfig>;
/** Fluentd transport management class */
export declare class FluentdTransport {
/** Debug logger for development and deep troubleshooting */
private readonly debug;
/** Default transport config */
private readonly defaultConfig;
/** Transport configuration */
private readonly _config;
/** Transport instance */
private readonly instance;
/**
* Create a fluentd transport instance
* @param label - Logger label
* @param logger - Logger instance
* @param uuid - uuid of the logger instance
* @param configuration - Transport config
*/
constructor(label: string, logger: Logger, uuid: string, configuration?: FluentdTransportConfig);
/** Transport configuration */
get config(): FluentdTransportConfig;
/** Mongodb mode transport instance */
get transport(): FluentTransportInterface;
}
export {};
//# sourceMappingURL=fluentd.d.ts.map