0.0.2 • Published 7 months ago

nestjs-logs v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

NestJS Logs

A NestJS logging package.

Installation

npm install nestjs-logs

Usage

Importing the Log Module To use the logging service in your NestJS application, you need to import the LogModule into your AppModule or any other module where you want to use logging.

import { LogModule } from 'nestjs-logs';

@Module({
  imports: [LogModule],
  providers: [AppService],
})
export class AppModule {}

Injecting the LogService

Once the LogModule is imported, you can inject the LogService into your services or controllers to log messages at various levels (info, debug, warn, error).

import { Injectable } from '@nestjs/common';
import { LogService } from 'nestjs-logs';

@Injectable()
export class AppService {
  constructor(private readonly logService: LogService) {}
}
0.0.2

7 months ago

1.0.0

7 months ago