Skip to content

Commit

Permalink
chore: add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dvirtz committed Oct 25, 2023
1 parent a6459c5 commit bef5dd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/arrow-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export class ArrowBackend extends ParquetBackend {
try {
const module = await import("parquet-reader");
this.readParquet_ = module.readParquet;
} catch (_) {
throw new Error('cannot find prebuilt arrow module, either build the module or use another backend');
} catch (error) {
throw new Error(`cannot find prebuilt arrow module, either build the module or use another backend: ${error}`);
}
}
this.readParquet_(path, stream);
Expand Down
2 changes: 2 additions & 0 deletions src/parquet-backend-factory.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { ArrowBackend } from './arrow-backend';
import { BackendName } from './backend-name';
import { getLogger } from './logger';
import { ParquetToolsBackend } from './parquet-tools-backend';
import { ParquetsBackend } from './parquets-backend';

export function createParquetBackend(backend: BackendName) {
getLogger().info(`using ${backend} backend`);
switch (backend) {
case 'parquet-tools':
return new ParquetToolsBackend;
Expand Down

0 comments on commit bef5dd9

Please sign in to comment.