UNPKG

onirii

Version:

Universal queue SDK

59 lines (58 loc) 1.59 kB
import { Logger } from 'log4js'; /** * Log factory for create log instance * * @since 1.0.0 * @date 2021-06-01 * @author Luminous(BGLuminous) */ export declare class LogFactory { protected static currentPath: string; protected static config: { appenders: { console: { type: string; layout: { type: string; }; }; default: { type: string; filename: string; pattern: string; keepFileExt: boolean; encoding: string; }; }; categories: { default: { appenders: string[]; level: string; }; }; }; private static dirReady; /** * Re-flash log4js configure and create new logger instance (this key config already exist only creat logger instace) * * @param {string} key new logger key * @return {Logger} logger instance */ static create(key: string): Logger; /** * Generate new appender config * * @param {string} key new logger key * @return {{[p: string]: {filename: string, keepFileExt: boolean, pattern: string, type: string, encoding: string}}} * @private */ private static generateAppender; /** * Generate new categories config * * @param {string} key new logger key * @return {{[p: string]: {level: string, appenders: string[]}}} * @private */ private static generateCategories; }