新增实例槽位隔离与结构化日志,多开不再共用日志与账号
This commit is contained in:
@@ -116,20 +116,44 @@ export namespace gui {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class LogEntry {
|
||||
time: string;
|
||||
level: string;
|
||||
message: string;
|
||||
export class InstanceInfo {
|
||||
name: string;
|
||||
id: string;
|
||||
dataDir: string;
|
||||
logDir: string;
|
||||
logFile: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new LogEntry(source);
|
||||
return new InstanceInfo(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.name = source["name"];
|
||||
this.id = source["id"];
|
||||
this.dataDir = source["dataDir"];
|
||||
this.logDir = source["logDir"];
|
||||
this.logFile = source["logFile"];
|
||||
}
|
||||
}
|
||||
export class LogStats {
|
||||
level: string;
|
||||
filePath: string;
|
||||
dir: string;
|
||||
dropped: number;
|
||||
count: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new LogStats(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.time = source["time"];
|
||||
this.level = source["level"];
|
||||
this.message = source["message"];
|
||||
this.filePath = source["filePath"];
|
||||
this.dir = source["dir"];
|
||||
this.dropped = source["dropped"];
|
||||
this.count = source["count"];
|
||||
}
|
||||
}
|
||||
export class PrizeListResult {
|
||||
@@ -530,3 +554,30 @@ export namespace huya {
|
||||
|
||||
}
|
||||
|
||||
export namespace logger {
|
||||
|
||||
export class Entry {
|
||||
id: number;
|
||||
time: string;
|
||||
level: string;
|
||||
category: string;
|
||||
account: string;
|
||||
message: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Entry(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.time = source["time"];
|
||||
this.level = source["level"];
|
||||
this.category = source["category"];
|
||||
this.account = source["account"];
|
||||
this.message = source["message"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user