1.0.8 • Published 3 years ago

@xpjs/nest-winston v1.0.8

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

nest-winston

用法

1、引入日志模块

// app.module.ts
import { Module } from '@nestjs/common';
import { Logger } from '@xpjs/nest-winston';

@Module({
    imports: [
        // 日志模块
        Logger.register(),
    ],
})
export class AppModule {}

2、在服务中使用

// service.ts
import { Logger } from '@xpjs/nest-winston';
import { Injectable, Inject } from '@nestjs/common';

@Injectable()
export class LogTestService {
    @Inject()
    private readonly logger: Logger;
}
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

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