Commit cb91374
authored
fix(logger): merge child logger options correctly (#1178)
* bug(logger): fix bug when child logger with overwritten options clears all other options
* test(logger): add tests for createChild method
* refactor(logger): remove clonedeep dependency
* refactor(logger): move initOptions initializer to setOptions
* feat(logger): add addPersistentLogAttributes from parent to child logger
* test(logger): add tests for createChild with persistent log attrs
* feat(logger): added addContext support, remove redundant initOption
* refactor(logger): add parent's context to child explicitly, without merging1 parent cb9eaf9 commit cb91374
File tree
5 files changed
+312
-48
lines changed- packages/logger
- src
- tests/unit
5 files changed
+312
-48
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
154 | | - | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
| |||
205 | 203 | | |
206 | 204 | | |
207 | 205 | | |
208 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
209 | 217 | | |
210 | 218 | | |
211 | 219 | | |
| |||
0 commit comments