Skip to content

Commit

Permalink
v 5.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandro-bottamedi committed Oct 18, 2024
1 parent 7fb62a3 commit d141533
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [5.2.1] - 18-10-2024

- Minor bugfix

## [5.2.0] - 17-10-2024

- Ensures JSON.stringify print nested objects correctly (issue #97)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-logs",
"version": "5.2.0",
"version": "5.2.1",
"description": "Performance-aware simple logger for React-Native with namespaces, custom levels and custom transports (colored console, file writing, etc.)",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,11 @@ const createLogger = <Y extends string>(config?: configLoggerType) => {
};

// Merge all non undefined values
let mergeConfig = config ? JSON.parse(JSON.stringify(config)) : {};

const mergedConfig = {
...defaultLogger,
...JSON.parse(JSON.stringify(config)),
...mergeConfig,
};

return new logs(mergedConfig) as unknown as Omit<logs, "extend"> &
Expand Down

0 comments on commit d141533

Please sign in to comment.