logger/index.ts

15 lines
586 B
TypeScript

import MasterLogger from "./src/MasterLogger.js";
import LoggerClient from './src/LoggerClient.js';
import Defaults, { LogLevel } from "./src/Defaults.js";
const addLogLevel = (name: string, level: number) => {
if (typeof name !== 'string')
throw new Error('Name must be a string');
if (typeof level !== 'number')
throw new Error('Level must be a number');
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
LogLevel[LogLevel[name] = level] = name;
};
export { MasterLogger, LoggerClient, Defaults, LogLevel, addLogLevel };