diff --git a/src/logging/conf.ts b/src/logging/conf.ts new file mode 100644 index 0000000..6c1d8e2 --- /dev/null +++ b/src/logging/conf.ts @@ -0,0 +1,34 @@ +import { ISettingsParam } from 'tslog/src/index'; +import { Logger } from 'tslog'; + +export const defaultLoggerOptions: ISettingsParam = { + printLogMessageInNewLine: true, + setCallerAsLoggerName: false, + displayFunctionName: false, + overwriteConsole: true, + logLevelsColors: { + '0': 'grey', + '1': 'white', + '2': 'cyan', + '3': 'blue', + '4': 'yellowBright', + '5': 'red', + '6': 'redBright' + }, + minLevel: 'debug' +}; + +export const log = { + cache: new Logger({ + ...defaultLoggerOptions + }), + client: new Logger({ + ...defaultLoggerOptions + }), + core: new Logger({ + ...defaultLoggerOptions + }), + plugins: new Logger({ + ...defaultLoggerOptions + }) +};