marblejs / marble

Marble.js - functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS.
https://marblejs.com
MIT License
2.15k stars 73 forks source link

feat(messaging): pass event payload to input and output logger #302

Closed Tomisiak closed 3 years ago

Tomisiak commented 3 years ago

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

Currently it is not possible to log the detailed information about the event payload.

What is the new behavior?

The event payload is passed to the LoggerOptions inside data object in input and output logger middlewares. This information can be then extracted inside logger implementation and outputted to the console.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

codecov[bot] commented 3 years ago

Codecov Report

Merging #302 (ba29e61) into master (cbdffda) will increase coverage by 0.27%. The diff coverage is 96.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #302      +/-   ##
==========================================
+ Coverage   95.41%   95.68%   +0.27%     
==========================================
  Files         157      163       +6     
  Lines        2769     3084     +315     
  Branches      366      426      +60     
==========================================
+ Hits         2642     2951     +309     
- Misses        123      128       +5     
- Partials        4        5       +1     
Impacted Files Coverage Δ
packages/core/src/context/context.hook.ts 100.00% <ø> (ø)
...ackages/core/src/effects/effectsContext.factory.ts 100.00% <ø> (ø)
packages/core/src/logger/logger.interface.ts 100.00% <ø> (ø)
packages/messaging/src/reply/reply.ts 100.00% <ø> (ø)
...rc/transport/strategies/amqp.strategy.interface.ts 81.81% <ø> (ø)
.../testing/src/testBed/http/http.testBed.response.ts 75.00% <40.00%> (-13.24%) :arrow_down:
packages/core/src/+internal/utils/string.util.ts 92.00% <66.66%> (-8.00%) :arrow_down:
packages/core/src/+internal/utils/any.util.ts 84.61% <71.42%> (+1.28%) :arrow_up:
...ore/src/http/response/http.responseBody.factory.ts 80.95% <73.33%> (-19.05%) :arrow_down:
...ssaging/src/transport/strategies/local.strategy.ts 92.15% <83.33%> (+4.92%) :arrow_up:
... and 65 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 614d1e7...ba29e61. Read the comment docs.