import { Observable } from "../Observable"; export declare const DebugLevel = 400; export declare const LogLevel = 300; export declare const WarnLevel = 200; export declare const ErrorLevel = 100; export declare const SilentLevel = 0; export interface TraceEvent { readonly source: TraceSource; readonly level: number; readonly message: any; readonly args?: any[]; } export declare class TraceSource { readonly id: any; level: number; readonly events: Observable; private readonly _provider; constructor(id?: any); protected emit(level: number, message: any, args: any[]): void; isDebugEnabled(): boolean; debug(data: any): void; debug(msg: string, ...args: any[]): void; isLogEnabled(): boolean; log(data: any): void; log(msg: string, ...args: any[]): void; isWarnEnabled(): boolean; warn(data: any): void; warn(msg: string, ...args: any[]): void; /** * returns true if errors will be recorded. */ isErrorEnabled(): boolean; /** Traces a error * @param data The object which will be passed to the underlying listeners */ error(data: any): void; /** * Traces a error. * * @param msg the message. * @param args parameters which will be substituted in the message. */ error(msg: string, ...args: any[]): void; /** * Checks whether the specified level is enabled for this * trace source. * * @param level the trace level which should be checked. */ isEnabled(level: number): boolean; /** * Traces a raw event, passing data as it is to the underlying listeners * * @param level the level of the event * @param msg the data of the event, can be a simple string or any object. */ traceEvent(level: number, msg: any, ...args: any[]): void; /** * Register the specified handler to be called for every new and already * created trace source. * * @param handler the handler which will be called for each trace source */ static on(handler: (source: TraceSource) => void): import("../interfaces").IDestroyable; /** * Creates or returns already created trace source for the specified id. * * @param id the id for the trace source */ static get(id: any): TraceSource; }