@nestjs-logger/file
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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

Key Type Required Default
directory string Yes
filename string No nest
extension string No log

Readme

Keywords

Package Sidebar

Install

npm i @nestjs-logger/file

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

10.5 kB

Total Files

7

Last publish

Collaborators

  • avidian