-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(logger): pretty printing logs in local and non-prod environment (#…
…1141) * test(logger): add tests for POWERTOOLS_DEV env var and for pretty printing logs when var is set to truthy value * feat(logger): add POWERTOOLS_DEV env var and method to get its value * test(logger): fix tests adding method that gets value of POWERTOOLS_DEV env var * feat(logger): add pretty printing to logs if POWERTOOLS_DEV env var set to truthy value * refactor(review): add private class property for indent size, move evaluation of this property to setOptions() * test(logger): fix tests according to the changes in default logger config * docs(logger): update sections for pretty printing logs using POWERTOOLS_DEV env var * Update docs/core/logger.md * Update docs/core/logger.md Co-authored-by: ijemmy <[email protected]> * fix(docs): update default value for POWERTOOLS_DEV env var * feat(logger): add isValueTrue method that checks the string value for truthiness * test(logger): adjust tests for config interface * test(logger): add tests for isValueTrue method, remove redundunt tests Co-authored-by: Andrea Amorosi <[email protected]> Co-authored-by: ijemmy <[email protected]>
- Loading branch information
1 parent
8533abe
commit 8d52660
Showing
10 changed files
with
211 additions
and
38 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
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
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
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
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
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 |
---|---|---|
|
@@ -74,3 +74,8 @@ export { | |
ConstructorOptions, | ||
HandlerOptions | ||
}; | ||
|
||
export const enum LogJsonIndent { | ||
PRETTY = 4, | ||
COMPACT = 0, | ||
} |
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
Oops, something went wrong.