smartlog/ts/smartlog.classes.loggroup.ts

24 lines
754 B
TypeScript
Raw Normal View History

2020-06-08 16:16:54 +00:00
import * as plugins from './smartlog.plugins';
2020-06-08 20:39:40 +00:00
import { Smartlog } from './smartlog.classes.smartlog';
2020-06-08 16:16:54 +00:00
2020-06-08 20:39:40 +00:00
export class LogGroup {
public smartlogRef: Smartlog;
public transactionId: string;
public groupId = plugins.isounique.uni();
constructor(smartlogInstance: Smartlog, transactionIdArg: string) {
this.smartlogRef = smartlogInstance;
this.transactionId = transactionIdArg;
}
public log(logLevelArg: plugins.smartlogInterfaces.TLogLevel, logMessageArg: string, logDataArg?: any) {
this.smartlogRef.log(logLevelArg, logMessageArg, logDataArg, {
id: plugins.isounique.uni(),
type: 'none',
group: this.groupId,
instance: this.smartlogRef.uniInstanceId,
transaction: this.transactionId
});
}
}