Skip to content

Commit

Permalink
Merge pull request #8 from ccoeurderoy/feat/logger_options
Browse files Browse the repository at this point in the history
feat(logger): add the ability to override pino options
  • Loading branch information
Charles Coeurderoy authored Jul 17, 2020
2 parents 80f63b6 + f84354d commit 2dbe6c6
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 246 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The only static method from the `PubSubFactory` class. It initiates a new PubSub
- `options`: Options related to the transport.
- If `transport === Transport.GOOGLE_PUBSUB`, then have a look at the [Google Cloud PubSub config client](https://googleapis.dev/nodejs/pubsub/latest/global.html#ClientConfig).
- `debug`: Display logs if it is set to true. It uses a [pino logger](https://getpino.io/#/) and [pino-pretty](https://github.com/pinojs/pino-pretty) if `NODE_ENV` is not equal to `production`.
- `pinoOptions`: If `debug` is set to true, set the [pino logger options](https://getpino.io/#/docs/api?id=options). Default to `level: debug` and `prettyPrint: true` if `NODE_ENV` is not equal to `production`.
- `topicsPrefix`: Add a prefix to all created topics. Example: `topicsPrefix: 'my-topic'`, all topics will begin with `my-topic+{your topic name}`.
- `subscriptionsPrefix`: Add a prefix to all created subscriptions. Example: `subscriptionsPrefix: 'my-sub'`, all topics will begin with `my-sub%{your topic name}`.
- `namespace`: Add a namespace property to [Message attributes](https://googleapis.dev/nodejs/pubsub/latest/google.pubsub.v1.html#.PubsubMessage) when publishing on a topic.
Expand Down
Loading

0 comments on commit 2dbe6c6

Please sign in to comment.