import { tsInterface } from '../interface/entry' import { tsLog } from '../logger/logger' /** * 基础对象模块 */ export module tsEntry { /** * 基础对象 */ export class Entry implements tsInterface.IEntry { private _entryName: string = 'Entry' get entryName() { return this._entryName } set entryName(value: string) { this._entryName = value } private _id: number get id() { return this._id } set id(value: number) { this._id = value } private _name: string get name() { return this._name } set name(value: string) { this._name = value } private _typ: number get typ() { return this._typ } set typ(value: number) { this._typ = value } get fullName() { return `${this._entryName}[${this._id},${this._name},${this._typ}]` } constructor(id: number = 0, name: string = '', typ: number = 0) { this._id = id this._name = name this._typ = typ } trace(message: any, ...optionalParams: any[]): void { tsLog.Logger.trace(this.fullName, message, ...optionalParams) } debug(message: any, ...optionalParams: any[]): void { tsLog.Logger.debug(this.fullName, message, ...optionalParams) } info(message: any, ...optionalParams: any[]): void { tsLog.Logger.info(this.fullName, message, ...optionalParams) } warn(message: any, ...optionalParams: any[]): void { tsLog.Logger.warn(this.fullName, message, ...optionalParams) } error(message: any, ...optionalParams: any[]): void { tsLog.Logger.error(this.fullName, message, ...optionalParams) } tracef(message: string, ...optionalParams: any[]): void { tsLog.Logger.tracef(this.fullName + ' ' + message, ...optionalParams) } debugf(message: string, ...optionalParams: any[]): void { tsLog.Logger.debugf(this.fullName + ' ' + message, ...optionalParams) } infof(message: string, ...optionalParams: any[]): void { tsLog.Logger.infof(this.fullName + ' ' + message, ...optionalParams) } warnf(message: string, ...optionalParams: any[]): void { tsLog.Logger.warnf(this.fullName + ' ' + message, ...optionalParams) } errorf(message: string, ...optionalParams: any[]): void { tsLog.Logger.errorf(this.fullName + ' ' + message, ...optionalParams) } traceStack(message: any, ...optionalParams: any[]): void { tsLog.Logger.traceStack(this.fullName, message, ...optionalParams) } debugStack(message: any, ...optionalParams: any[]): void { tsLog.Logger.debugStack(this.fullName, message, ...optionalParams) } infoStack(message: any, ...optionalParams: any[]): void { tsLog.Logger.infoStack(this.fullName, message, ...optionalParams) } warnStack(message: any, ...optionalParams: any[]): void { tsLog.Logger.warnStack(this.fullName, message, ...optionalParams) } errorStack(message: any, ...optionalParams: any[]): void { tsLog.Logger.errorStack(this.fullName, message, ...optionalParams) } traceStackf(message: string, ...optionalParams: any[]): void { tsLog.Logger.traceStackf(this.fullName + ' ' + message, ...optionalParams) } debugStackf(message: string, ...optionalParams: any[]): void { tsLog.Logger.debugStackf(this.fullName + ' ' + message, ...optionalParams) } infoStackf(message: string, ...optionalParams: any[]): void { tsLog.Logger.infoStackf(this.fullName + ' ' + message, ...optionalParams) } warnStackf(message: string, ...optionalParams: any[]): void { tsLog.Logger.warnStackf(this.fullName + ' ' + message, ...optionalParams) } errorStackf(message: string, ...optionalParams: any[]): void { tsLog.Logger.errorStackf(this.fullName + ' ' + message, ...optionalParams) } } }