# @node-ts/logger-pino

> A pino adapter for @node-ts/logger

Latest version **0.1.2** (published 2020-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @node-ts/logger-pino
pnpm add @node-ts/logger-pino
yarn add @node-ts/logger-pino
bun add @node-ts/logger-pino
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2020-05-06 |
| First published | 2019-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 23.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Ajith Chandran |
| Maintainers | adenhertog, ajith_chandran |
| Keywords | logger, pino, node-ts |

## Links

- npm: https://www.npmjs.com/package/@node-ts/logger-pino
- Repository: https://github.com/node-ts/logger
- Homepage: https://github.com/node-ts/logger#readme
- Issues: https://github.com/node-ts/logger/issues
- npm.io page: https://npm.io/package/@node-ts/logger-pino

## Dependencies (1)

- [autobind-decorator](https://npm.io/package/autobind-decorator.md) ^2.4.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2020-05-06
- 0.1.1 — 2019-08-03

## README

# @node-ts/logger-pino

A Pino implementation for logger. 

## Usage

Install the package and its dependenceis

```
npm i @node-ts/logger-pino @node-ts/logger-core
```

Load the modules during application startup in inversify:

```typescript
import { Container } from 'inversify'
import { LoggerModule } from '@node-ts/logger-core'
import { PinoModule } from '@node-ts/logger-pino'

// ...

const container = new Container()
container.load(new LoggerModule())
container.load(new PinoModule())
```

## Custom Configuration

To configure the pino logger instances, provide your own `PinoConfiguration` implementation, ie:

```typescript

@injectable()
export class CustomPinoConfiguration implements PinoConfiguration {
  getConfiguration (loggerName: string): pino.LoggerOptions {
    return {
      enabled: true,
      level: 'info',
      prettyPrint: false,
      serializers: noir
      ....
    }
  }
}
```

Then to use it, rebind the `PINO_SYMBOLS.PinoConfiguration` symbol on your application startup:

```typescript
import { ContainerModule } from 'inversify'
import { CustomWinstonConfiguration } from './custom-winston-configuration'
import { PINO_SYMBOLS } from '@node-ts/logger-pino'

export class ApplicationModule extends ContainerModule {
  constructor () {
    super((_, __, ___, rebind) => {
      rebind(PINO_SYMBOLS.PinoConfiguration).to(CustomPinoConfiguration)
    })
  }
}

```

---
_Source: https://npm.io/package/@node-ts/logger-pino · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
