fix comment, rm console.log

This commit is contained in:
2025-07-16 22:53:01 +09:00
parent 07b0b0f702
commit b059fe1de0
7 changed files with 109 additions and 67 deletions

View File

@@ -3,7 +3,7 @@ class Logger {
constructor() {
this.isDev = import.meta.env.DEV || false
this.debugEnabled = import.meta.env.VITE_ENABLE_DEBUG === 'true'
this.isEnabled = this.isDev && this.debugEnabled // Enable only in dev AND when debug flag is true
this.isEnabled = this.debugEnabled // Enable when debug flag is true (regardless of dev mode)
}
log(...args) {
@@ -76,7 +76,7 @@ class Logger {
// シングルトンインスタンス
export const logger = new Logger()
// 開発環境でのみグローバルアクセス可能にする
if (import.meta.env.DEV && import.meta.env.VITE_ENABLE_DEBUG === 'true') {
// デバッグ有効時にグローバルアクセス可能にする
if (import.meta.env.VITE_ENABLE_DEBUG === 'true') {
window._logger = logger
}