# nest-log

> 测试nestjs模块包发布

Latest version **0.0.2** (published 2020-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install nest-log
pnpm add nest-log
yarn add nest-log
bun add nest-log
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2020-08-10 |
| First published | 2020-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 399.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kuangshp@126.com |
| Maintainers | kuangshp |
| Keywords | nestjs, 打印, typescript |

## Links

- npm: https://www.npmjs.com/package/nest-log
- Homepage: https://github.com/kuangshp/nest-log
- npm.io page: https://npm.io/package/nest-log

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2020-08-10
- 0.0.1 — 2020-08-10

## README

> 本包纯属是测试自己发布`Nestjs`包的方式,没任何功能点,如果你还不会发布`Nestjs`包的可以学习下

# 使用方式
* 1、安装包

  ```shell
  npm install nest-log
  ```

* 2、在需要使用的模块中引入

  ```ts
  import { NestLogModule } from 'nest-log';

  @Module({
    imports: [
      // 使用自己刚刚发布的npm包
      NestLogModule.register('test---')
    ],
    providers: [UsersService],
    controllers: [UsersController]
  })
  export class UsersModule { }
  ```

* 3、在控制器中使用服务

  ```ts
  import { Controller, Get } from '@nestjs/common';
  import { NestLogService } from 'nest-log';

  @Controller('users')
  export class UsersController {
    constructor (
      private readonly nestLogService: NestLogService,
    ) { }

    @Get()
    hello(): string {
      this.nestLogService.log('获取用户信息')
      return 'hello';
    }
  }
  ```

---
_Source: https://npm.io/package/nest-log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
