import ConfigProvider from "../config/management/configProvider"; import ErrorBag from '../error/errorBag'; import SimpleLogger from './simpleLogger'; import ZationServer from "../../core/ZationServer"; export interface LogAPI extends SimpleLogger { /** * @param global * Explicitly specifies if global or local logging should be used. * The defaultGlobal option defines what logging should be used when it is not explicitly specified. * Global logging combines local (console or file) and remote (panel) logging. */ (global: boolean): SimpleLogger; } export default class Logger { private static _simpleLocalLogger; private static _simpleGlobalLogger; private static _initialized; private static _showConfigWarnings; /** * @description * The logger gives you the possibility to log information into the console, a log file or the panel. * You can explicitly specify if global or local logging should be used. * The defaultGlobal option defines what logging should be used when it is not explicitly specified. * Global logging combines local (console or file) and remote (panel) logging. * Notice that the server config settings are considered. * @example * //default logging (depends on defaultGlobal option) * log.debug('Some debug message'); * //explicitly global * log(true).info("Hello"); * //explicitly local * log(false).info("Hello"); */ static log: LogAPI; static init(server: ZationServer, cp: ConfigProvider, rootPath: string): void; static logLaunchFail(msg: string): void; static consoleLogConfigWarning(configName: string | string[], message: string): void; static consoleLogErrorBag(errorBag: ErrorBag, errorType?: string): void; }