Skip to content

Commit 3a1fcba

Browse files
New: adds keepReflectMetadata option. closes #124
1 parent 9b06e04 commit 3a1fcba

File tree

4 files changed

+2987
-2228
lines changed

4 files changed

+2987
-2228
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ Next values could also be passed to constructor config, but are customizable fro
110110
* **resultSanitizer** - output data sanitizer, by default [dataSanitizer](#sanitizers)
111111
* **errorSanitizer** - error sanitizer, by default [simpleSanitizer](#sanitizers)
112112
* **contextSanitizer** - function context sanitizer, if ommited, no context will be logged.
113-
* **dublicates** - if set to *true*, it is possible to use multiple decorators at once (see [example](#duplicates))
113+
* **dublicates** - if set to *true*, it is possible to use multiple decorators at once (see [example](#duplicates)). **Note:** `duplicates` key also works, `dublicates` will be completle renamed to `duplicates` in version 2.0.
114+
* **keepReflectMetadata** - if `logger-decorator` is used with other decorators, they can set own [reflect metadata](https://blog.bitsrc.io/typescripts-reflect-metadata-what-it-is-and-how-to-use-it-fb7b19cfc7e2). by passing `keepReflectMetadata` array, you can prevent metadata from reset. For example for nestJS its good idea to use `{ keepReflectMetadata: ['method', 'path'] }`.
114115

115116
Next parametrs could help in class method filtering:
116117
* **getters** - if set to *true*, [getters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) will also be logged (applied to class and class-method decorators)

0 commit comments

Comments
 (0)