UNPKG

advanced-logger

Version:

Advanced logger module extendable with plugins. Works in nodejs and browsers

23 lines (22 loc) 859 B
import IDefaultLogConfig from "../interface/config/IDefaultLogConfig"; import IRequestConfig from "../interface/config/IRequestConfig"; import IServiceConfig from "../interface/config/IServiceConfig"; import IDestructable from "../interface/IDestructable"; import IService from "../interface/IService"; export default class BaseRemoteService implements IService, IDestructable { protected serviceConfig: IRequestConfig; protected defaultLogConfig: IDefaultLogConfig; constructor(config: IServiceConfig); serializer<T>(log: T): string; sendAllLogs<T>(logs: T[]): Promise<Response>; preparePayload<T>(logs: T[]): Promise<string>; destroy(): void; /** * Returns object for headers config * @example * {"Content-Type": "text/plain"} */ protected getHeaders(): { [propName: string]: string; }; }