1.0.4 • Published 3 years ago

@nestjs-logger/file v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

NestJS File Logger

Logger for saving into a single file.

Installation

NPM

npm install @nestjs-logger/file

Yarn

yarn add @nestjs-logger/file

Usage

import { FileLogger } from '@nestjs-logger/file';
import { resolve } from 'fs';

const app = await NestFactory.create(AppModule, {
    logger: FileLogger.create({
        directory: resolve(__dirname, '../storage/logs'),
    }),
});

This will log into ./storage/logs/nest.log outside the dist directory.

NOTE: All the following directories must be already existing.

Options

KeyTypeRequiredDefault
directorystringYes
filenamestringNonest
extensionstringNolog
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago