@skyway-sdk/common
Version:
The official Next Generation JavaScript SDK for SkyWay
47 lines • 1.79 kB
TypeScript
/**
* @description [japanese]
* 以下のいずれかを指定可能
* - disable: ログの出力を無効化する。
* - error: 回復不能なエラーに関する情報を出力する。
* - warn: SDK 内部で発生した、一時的なエラーに関する情報を出力する。基本的には SDK が内部でリトライ処理を行うことで回復する。
* - info: SDK が提供しているメソッドの呼び出しに関する情報を出力する。
* - debug: SDK の内部のメソッド呼び出しや、リクエスト・レスポンスに関する情報など、最も詳細なログを出力する。
*/
export declare const logLevelTypes: readonly ["disable", "error", "warn", "info", "debug"];
export declare type LogLevel = (typeof logLevelTypes)[number];
export declare type LogFormat = 'object' | 'string';
export declare class Logger {
static level: LogLevel;
static format: LogFormat;
static onLog: (props: {
level: string;
timestamp: string;
message: any[];
id: string;
}) => void;
/**@internal */
static readonly id: string;
/**@internal */
prefix: string;
/**@internal */
constructor(prefix: string);
/**@internal */
debug: (...msg: any[]) => number;
/**@internal */
info: (...msg: any[]) => number;
/**@internal */
warn: (...msg: any[]) => void;
/**@internal */
error: (...msg: any[]) => void;
/**@internal */
elapsed: (timestamp: number, ...msg: any[]) => void;
private _log;
/**@internal */
createBlock(info: object): {
warn: (...msg: any[]) => void;
debug: (...msg: any[]) => void;
info: (...msg: any[]) => void;
error: (...msg: any[]) => void;
};
}
//# sourceMappingURL=logger.d.ts.map