0.4.1 • Published 2 years ago

@finastra/nestjs-logger v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

NestJS module to log in specific formats :

  • Azure Monitor (previously OMS)

Use it

Import the logger module in your main module

app.module.ts

@Module({
  imports: [
    LoggerModule,
    ...
  ],
})
export class AppModule {}

Define which module to use in the bootstrapping of your app :

main.ts

const omsLogger = new OMSLogger();
const app = await NestFactory.create(AppModule, {
  logger: ['warn', 'log', 'error'],
});
app.useLogger(omsLogger);
app.useGlobalInterceptors(new HttpLoggingInterceptor());

GraphQL

If you're using GraphQL in your application, there's another interceptor for you :

app.useGlobalInterceptors(new GraphQLLoggingInterceptor());
0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago