/******************************************************************************** * Copyright (C) 2017 Ericsson and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is available at * https://www.gnu.org/software/classpath/license.html. * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ import { LoggerWatcher } from './logger-watcher'; import { Logger, Log, Loggable } from '@gedit/utils'; import { LoggerServer, LogLevel, rootLoggerName } from './logger-protocol'; export declare const LoggerFactory: unique symbol; export type LoggerFactory = (name: string) => Logger; export declare const LoggerName: unique symbol; export { LogLevel, rootLoggerName }; /** * Counterpart of the `#setRootLogger(ILogger)`. Restores the `console.xxx` bindings to the original one. * Invoking has no side-effect if `setRootLogger` was not called before. Multiple function invocation has * no side-effect either. */ export declare function unsetRootLogger(): void; export declare function setRootLogger(aLogger: Logger): void; export declare class LoggerImpl implements Logger { protected readonly server: LoggerServer; protected readonly loggerWatcher: LoggerWatcher; protected readonly factory: LoggerFactory; protected name: string; protected _logLevel: Promise; protected created: Promise; /** * Build a new Logger. */ constructor(server: LoggerServer, loggerWatcher: LoggerWatcher, factory: LoggerFactory, name: string); setLogLevel(logLevel: number): Promise; getLogLevel(): Promise; isEnabled(logLevel: number): Promise; ifEnabled(logLevel: number): Promise; log(logLevel: number, arg2: any | Loggable, ...params: any[]): Promise; isTrace(): Promise; ifTrace(): Promise; trace(arg: any | Loggable, ...params: any[]): Promise; isDebug(): Promise; ifDebug(): Promise; debug(arg: any | Loggable, ...params: any[]): Promise; isInfo(): Promise; ifInfo(): Promise; info(arg: any | Loggable, ...params: any[]): Promise; isWarn(): Promise; ifWarn(): Promise; warn(arg: any | Loggable, ...params: any[]): Promise; isError(): Promise; ifError(): Promise; error(arg: any | Loggable, ...params: any[]): Promise; isFatal(): Promise; ifFatal(): Promise; fatal(arg: any | Loggable, ...params: any[]): Promise; child(name: string): Logger; protected getLog(logLevel: number): Promise; protected format(value: any): any; } //# sourceMappingURL=logger.d.ts.map