broology / poker-moons

Free online poker with friends without the hassle.
4 stars 3 forks source link

Implement logging #127

Closed dBaiko closed 2 years ago

dBaiko commented 2 years ago

Proposed Changes

Add a custom winston logger

Linked Issue

closes 59 https://github.com/broology/poker-moons/issues/59

Types of changes

Merge Checklist

Deployment Notes

Will need updates to the .env file

dBaiko commented 2 years ago

Just thought I'd point out. you can make the default nest logger use this custom logger I think by adding this to the apps/backend/main.ts

...
const app = await NestFactory.create(ApplicationModule, {
  bufferLogs: true,
});
app.useLogger(app.get(MyLogger));
...

I think your logger needs to implement import { ConsoleLogger } from '@nestjs/common'; if you do this though

This is literally what I do