1 | import { RpcServer } from './messaging/proxy-factory';
|
2 | export declare const ILoggerServer: unique symbol;
|
3 | export declare const loggerPath = "/services/logger";
|
4 | export interface ILoggerServer extends RpcServer<ILoggerClient> {
|
5 | setLogLevel(name: string, logLevel: number): Promise<void>;
|
6 | getLogLevel(name: string): Promise<number>;
|
7 | log(name: string, logLevel: number, message: any, params: any[]): Promise<void>;
|
8 | child(name: string): Promise<void>;
|
9 | }
|
10 | export declare const ILoggerClient: unique symbol;
|
11 | export interface ILogLevelChangedEvent {
|
12 | loggerName: string;
|
13 | newLogLevel: number;
|
14 | }
|
15 | export interface ILoggerClient {
|
16 | onLogLevelChanged(event: ILogLevelChangedEvent): void;
|
17 | onLogConfigChanged(): void;
|
18 | }
|
19 | export declare class DispatchingLoggerClient implements ILoggerClient {
|
20 | readonly clients: Set<ILoggerClient>;
|
21 | onLogLevelChanged(event: ILogLevelChangedEvent): void;
|
22 | onLogConfigChanged(): void;
|
23 | }
|
24 | export declare const rootLoggerName = "root";
|
25 | export declare enum LogLevel {
|
26 | FATAL = 60,
|
27 | ERROR = 50,
|
28 | WARN = 40,
|
29 | INFO = 30,
|
30 | DEBUG = 20,
|
31 | TRACE = 10
|
32 | }
|
33 | export declare namespace LogLevel {
|
34 | const strings: Map<LogLevel, string>;
|
35 | function toString(level: LogLevel): string | undefined;
|
36 | function fromString(levelStr: string): LogLevel | undefined;
|
37 | }
|
38 | export declare namespace ConsoleLogger {
|
39 | function reset(): void;
|
40 | function log(name: string, logLevel: number, message: string, params: any[]): void;
|
41 | }
|
42 |
|
\ | No newline at end of file |