@thescaffold/ntx-polylog
v0.2.31
Published
```ts the Ntx SDK to interact with the Polylog API for logging and analytics. import { EventsService, PolylogModule } from '@thescaffold/ntx-polylog';
Readme
Ntx SDK
Usages
import { EventsService, PolylogModule } from '@thescaffold/ntx-polylog';
// appModule.ts
PolylogModule.registerAsync({
imports: [ConfigModule],
useFactory: async (configService: ConfigService) => {
return {
server: `${configService.get('BASE_URL')}`,
credential: '',
sourceId: configService.get('SOURCE_ID'),
batch: {
interval: 5 * 1000,
limit: 25,
},
log: {
auto: false,
},
event: {
auto: true,
},
logs: [LogType.ERROR],
debug: true,
};
},
inject: [ConfigService],
}) as any,
// app.component.ts
this.eventsService.message(event, payload, {});