Skip to content

Commit c165795

Browse files
add logger to RN demo
1 parent 5419661 commit c165795

File tree

1 file changed

+7
-4
lines changed
  • demos/react-native-supabase-todolist/library/powersync

1 file changed

+7
-4
lines changed

demos/react-native-supabase-todolist/library/powersync/system.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import React from 'react';
55
import { SupabaseStorageAdapter } from '../storage/SupabaseStorageAdapter';
66

77
import { type AttachmentRecord } from '@powersync/attachments';
8+
import { configureFts } from '../fts/fts_setup';
89
import { KVStorage } from '../storage/KVStorage';
910
import { AppConfig } from '../supabase/AppConfig';
1011
import { SupabaseConnector } from '../supabase/SupabaseConnector';
1112
import { AppSchema } from './AppSchema';
1213
import { PhotoAttachmentQueue } from './PhotoAttachmentQueue';
13-
import { configureFts } from '../fts/fts_setup';
1414

1515
const logger = createBaseLogger();
1616
logger.useDefaults();
17-
logger.setLevel(LogLevel.INFO);
17+
logger.setLevel(LogLevel.DEBUG);
1818

1919
export class System {
2020
kvStorage: KVStorage;
@@ -31,19 +31,22 @@ export class System {
3131
schema: AppSchema,
3232
database: {
3333
dbFilename: 'sqlite.db'
34-
}
34+
},
35+
logger
3536
});
3637
/**
3738
* The snippet below uses OP-SQLite as the default database adapter.
3839
* You will have to uninstall `@journeyapps/react-native-quick-sqlite` and
3940
* install both `@powersync/op-sqlite` and `@op-engineering/op-sqlite` to use this.
4041
*
42+
* ```typescript
4143
* import { OPSqliteOpenFactory } from '@powersync/op-sqlite'; // Add this import
4244
*
4345
* const factory = new OPSqliteOpenFactory({
44-
* dbFilename: 'sqlite.db'
46+
* dbFilename: 'sqlite.db'
4547
* });
4648
* this.powersync = new PowerSyncDatabase({ database: factory, schema: AppSchema });
49+
* ```
4750
*/
4851

4952
if (AppConfig.supabaseBucket) {

0 commit comments

Comments
 (0)