fix: integrate centralized logger across services and hooks for improved logging consistency

This commit is contained in:
Alex Newman
2025-12-27 20:45:28 -05:00
parent 339e452bc0
commit 2ec9e58607
17 changed files with 67 additions and 56 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import { Database } from 'bun:sqlite';
import { DATA_DIR, DB_PATH, ensureDir } from '../../shared/paths.js';
import { logger } from '../../utils/logger.js';
// SQLite configuration constants
const SQLITE_MMAP_SIZE_BYTES = 256 * 1024 * 1024; // 256MB
@@ -126,7 +127,7 @@ export class DatabaseManager {
for (const migration of this.migrations) {
if (migration.version > maxApplied) {
console.log(`Applying migration ${migration.version}...`);
logger.info('DB', `Applying migration ${migration.version}`);
const transaction = this.db.transaction(() => {
migration.up(this.db!);
@@ -136,7 +137,7 @@ export class DatabaseManager {
});
transaction();
console.log(`Migration ${migration.version} applied successfully`);
logger.info('DB', `Migration ${migration.version} applied successfully`);
}
}
}