Skip to content

Commit

Permalink
chore: upgrade pino and fix depreciation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Feb 29, 2020
1 parent 49803b9 commit 2d88043
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/classes/_src_fakelogger_.fakelogger.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ are writte to the same top level stream

**Parameters:**

**bindings**: *object*

Name | Type |
------ | ------ |
`bindings` | object |
`level?` | Pino.Level | string |
`serializers?` | undefined | object |

**Returns:** *[FakeLogger](_src_fakelogger_.fakelogger.md)‹›*

Expand Down
5 changes: 4 additions & 1 deletion docs/classes/_src_logger_.logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ Returns a child logger instance

**Parameters:**

**bindings**: *object*

Name | Type |
------ | ------ |
`bindings` | object |
`level?` | Pino.Level | string |
`serializers?` | undefined | object |

**Returns:** *[Logger](_src_logger_.logger.md)‹›*

Expand Down
17 changes: 17 additions & 0 deletions docs/modules/_standalone_.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,21 @@

# External module: "standalone"

## Index

### References

* [FakeLogger](_standalone_.md#fakelogger)
* [Logger](_standalone_.md#logger)

## References

### FakeLogger

**FakeLogger**:

___

### Logger

**Logger**:
4 changes: 2 additions & 2 deletions src/getPino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ import { LoggerConfigContract } from '@ioc:Adonis/Core/Logger'
* Returns an instance of pino logger by adjusting the config options
*/
export function getPino (options: DeepReadonly<LoggerConfigContract>): Pino.Logger {
const pinoOptions = Object.assign({ changeLevelName: options.levelKey || 'level' }, options)
return options.stream ? Pino(pinoOptions, options.stream) : Pino(pinoOptions)
const pinoOptions = Object.assign({ levelKey: options.levelKey || 'level' }, options)
return options.stream ? Pino(pinoOptions as any, options.stream) : Pino(pinoOptions as any)
}

0 comments on commit 2d88043

Please sign in to comment.