Skip to content

Commit 49a0bb9

Browse files
Version Packages (#195)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent aeaf0e5 commit 49a0bb9

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

.changeset/great-windows-warn.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# @apollo/datasource-rest
22

3+
## 5.1.0
4+
5+
### Minor Changes
6+
7+
- [#186](https://github.com/apollographql/datasource-rest/pull/186) [`5ac9b52`](https://github.com/apollographql/datasource-rest/commit/5ac9b524b1227b018c522da1a4e53425d2b86024) Thanks [@js-lowes](https://github.com/js-lowes)! - Customize the logger used by `RESTDataSource`.
8+
By default the `RESTDataSource` will use `console`.
9+
Common use cases would be to override the default logger with `pino` or `winston`.
10+
11+
E.g.
12+
13+
```typescript
14+
const pino = require('pino');
15+
const loggerPino = pino({});
16+
const dataSource = new (class extends RESTDataSource {})({
17+
logger: loggerPino,
18+
});
19+
```
20+
21+
In the example above, all logging calls made by the `RESTDataSource` will now use the `pino` logger instead of the `console` logger.
22+
323
## 5.0.2
424

525
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@apollo/datasource-rest",
33
"description": "REST DataSource for Apollo Server v4",
4-
"version": "5.0.2",
4+
"version": "5.1.0",
55
"author": "Apollo <packages@apollographql.com>",
66
"license": "MIT",
77
"repository": {

0 commit comments

Comments
 (0)