@kiina/bigquery-logger
v0.0.3
Published
This package contains a class to save event logs to a Google BigQuery table.
Downloads
3
Keywords
Readme
BigQuery Logger
This package contains a class to save event logs to a Google BigQuery table.
Installation
npm install @kiina/bigquery-logger
Usage
const BigQueryLogger = require('@kiina/bigquery-logger');
const gcloudConfig = { /* ... */ };
const logger = new BigQueryLogger(gcloudConfig);
Methods
log(app: string, event: string, success: boolean, metadata?: string): Promise
Inserts a new event log in the table
await logger.log('myApp', 'ticket_status_update', true, '{ ticketId: 12392331 }');