Files
MyDIAPp/__test__/mocks/MockLogger.ts
Alexander Zinn f6d0afb98a Update bun.lock and remove DependencyManager tests
- Added new dependency "@techniker-me/tools" and updated existing dependencies to specific versions in bun.lock
- Removed the DependencyManager test file as part of codebase cleanup
2025-10-30 03:16:04 -04:00

32 lines
900 B
TypeScript

export class Logger {
private _category: string;
constructor(category: string) {
this._category = category;
}
public info(message: string, ...optionalParams: any[]) {
console.info(this.formatMessage(message), ...optionalParams);
}
public debug(message: string, ...optionalParams: any[]) {
console.debug(this.formatMessage(message), ...optionalParams);
}
public error(message: string, ...optionalParams: any[]) {
console.error(this.formatMessage(message), ...optionalParams);
}
public warn(message: string, ...optionalParams: any[]) {
console.warn(this.formatMessage(message), ...optionalParams);
}
public trace(message: string, ...optionalParams: any[]) {
console.trace(this.formatMessage(message), ...optionalParams);
}
private formatMessage(message: string) {
return `${new Date().toISOString()} [${this._category}] ${message}`;
}
}