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
- Host: GitHub
- URL: https://github.com/cbebe/nest-file-logger
- Owner: cbebe
- License: mit
- Created: 2022-06-05T01:38:27.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T01:38:58.000Z (about 4 years ago)
- Last Synced: 2025-02-28T18:05:48.417Z (over 1 year ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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));
```