An open API service indexing awesome lists of open source software.

https://github.com/cbebe/nest-file-logger

Log NestJS output to log files
https://github.com/cbebe/nest-file-logger

Last synced: 12 months ago
JSON representation

Log NestJS output to log files

Awesome Lists containing this project

README

          

# Nest File Logger

# Usage

Import `LoggerModule` into your `AppModule`

```ts
import { Module } from "@nestjs/common";
import LoggerModule from "nest-file-logger";

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

Use `FileLogger` on application setup:

```ts
import { NestFactory } from "@nestjs/core";
import { FileLogger } from "nest-file-logger";
import { AppModule } from "./app.module";

const app = await NestFactory.create(AppModule);
app.useLogger(app.get(FileLogger));
```