Skip to content

Commit 1f300d3

Browse files
committed
Improve logs
1 parent 6114fc9 commit 1f300d3

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/storage/WorkerStorageProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ function createWorkerStorageProvider(backend: 'sqlite' | 'idb'): StorageProvider
111111
worker = new Worker(new URL('./worker.js', import.meta.url), {type: 'module'});
112112
worker.onmessage = handleWorkerMessage;
113113
worker.onerror = (error) => {
114-
console.error('Storage worker error:', error);
114+
console.error('[Onyx] Storage worker error:', error);
115115
};
116116

117117
provider.store = worker;
118118

119119
// Send init message with the chosen backend and return the Promise
120120
// so that Storage.init() can await worker readiness.
121121
return postToWorker<void>({type: 'init', backend}).catch((error) => {
122-
console.error('Failed to initialize storage worker:', error);
122+
console.error('[Onyx] Failed to initialize storage worker:', error);
123123
});
124124
},
125125

lib/storage/providers/SQLiteProvider/index.web.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async function initAsync(): Promise<void> {
244244
} catch (opfsError) {
245245
// If opfs-sahpool is not available, fall back to in-memory
246246
// (the main thread will handle the full IDB fallback)
247-
console.error('opfs-sahpool VFS not available, using in-memory SQLite:', opfsError);
247+
console.error('[Onyx] opfs-sahpool VFS not available, using in-memory SQLite:', opfsError);
248248
db = new sqlite3.oo1.DB(':memory:');
249249
}
250250

lib/storage/worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async function handleMessage(msg: WorkerMessage): Promise<void> {
177177
await sqliteModule.initAsync();
178178
provider = sqliteProvider;
179179
} catch (sqliteError) {
180-
console.error('SQLite WASM init failed, falling back to IDB:', sqliteError);
180+
console.error('[Onyx] SQLite WASM init failed, falling back to IDB:', sqliteError);
181181
const idbModule = await import('./providers/IDBKeyValProvider');
182182
provider = idbModule.default;
183183
provider.init();

0 commit comments

Comments
 (0)