nest winston
// my.service.ts
import { PinoLogger, InjectPinoLogger } from "nestjs-pino";
@Injectable()
export class MyService {
// regular injecting
constructor(private readonly logger: PinoLogger) {}
// regular injecting and set context
constructor(private readonly logger: PinoLogger) {
logger.setContext(MyService.name);
}
// inject and set context via `InjectPinoLogger`
constructor(
@InjectPinoLogger(MyService.name) private readonly logger: PinoLogger
) {}
getWorld(...params: any[]) {
this.logger.info("getWorld(%o)", params);
return "World!";
}
}
Also in JavaScript:
- generate module with routing in angular
- discord.js get attachment url
- how can prevent morgan to work in test enviroment
- check if a key exists in an object javascript
- set css variable from javascript
- change windlow location relitave to current one
- make object move towards player p5js
- push array javascript
- reflection of an graph javascript
- anonymous function javascript
- mlutiple css jquery
- jquery copier dans le presse papier
- node module export multiple functions
- js toFixed
- redirect to url in javascript
- latest rn fatch blob package download
- if else jquery click function
- array unique values javascript
- javascript add option element to select
- quick sort in javascript
- javascript check if element has class
- reactjs interview questions site: github
- js date enlever jour
- how to update angular version