-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(utils): DefaultLogger does not trim messages by default and accep…
…ts more truthy strings for DEBUG env var (#7467)
- Loading branch information
Showing
3 changed files
with
35 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'@graphql-mesh/utils': minor | ||
--- | ||
|
||
Trimming log messages is an option independant of the DEBUG environment variable. | ||
|
||
Instead of trimming messages at 100 characters by default when the `DEBUG` environment variable is falsy, have the user configure the trim length that is not set by default. | ||
|
||
```js | ||
import { DefaultLogger } from '@graphql-mesh/utils'; | ||
const trimmedLogger = new DefaultLogger('my-logger', undefined, 100 /* trim at 100 characters*/); | ||
`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@graphql-mesh/utils': patch | ||
--- | ||
|
||
Accept '1', 't', 'true', 'y' and 'yes' as truthy values for DEBUG environment variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters