2023-04-12 19:13:14 +02:00
|
|
|
import MasterLogger from "./src/MasterLogger.js";
|
|
|
|
import LoggerClient from './src/LoggerClient.js';
|
2023-04-13 15:25:49 +02:00
|
|
|
import Defaults, { LogLevel } from "./src/Defaults.js";
|
2023-04-12 19:13:14 +02:00
|
|
|
|
2023-04-16 15:53:37 +02:00
|
|
|
export { WriteOptions, LogFunction } from "./src/Types.js";
|
|
|
|
export { LoggerClientOptions, LoggerMasterOptions } from './src/Defaults.js';
|
|
|
|
|
2023-04-13 15:25:49 +02:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2023-04-16 15:53:37 +02:00
|
|
|
|
2023-04-13 18:15:36 +02:00
|
|
|
export {
|
|
|
|
MasterLogger,
|
2023-04-16 15:53:37 +02:00
|
|
|
LoggerClient,
|
|
|
|
Defaults, LogLevel, addLogLevel,
|
|
|
|
};
|