add: a logger utils

This commit is contained in:
Tom Boullay
2026-04-24 14:02:16 +02:00
parent 38f9f087d1
commit 8c84663472
4 changed files with 146 additions and 5 deletions
+6 -1
View File
@@ -1,3 +1,5 @@
import { logger } from "@/utils/logger";
export class AudioManager {
private static _instance: AudioManager | null = null;
private readonly _audioPools = new Map<string, HTMLAudioElement[]>();
@@ -31,7 +33,10 @@ export class AudioManager {
return;
}
console.error(`Failed to play sound: ${path}`, error);
logger.error("AudioManager", "Failed to play sound", {
path,
error,
});
});
}