Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/interfaces/ILog.ts
1028 views
1
export default interface ILog extends IBoundLog<ILogData> {
2
level: string;
3
flush();
4
}
5
6
export interface IBoundLog<Base = any> {
7
stats<T extends Base>(action: string, data?: T): number;
8
info<T extends Base>(action: string, data?: T): number;
9
warn<T extends Base>(action: string, data?: T): number;
10
error<T extends Base>(action: string, data?: T): number;
11
createChild(module, boundData?: any): IBoundLog;
12
}
13
14
export interface ILogData {
15
sessionId: string;
16
parentLogId?: number;
17
}
18
19