Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: configure logging wrapper #152

Merged
merged 21 commits into from
Apr 30, 2024
Merged

Conversation

SamSalvatico
Copy link
Contributor

Description

Write a logging wrapper for Fastify that would help us to standardize logs between services as requested in the API Design document

Type

  • Dependency upgrade
  • Bug fix
  • New feature
  • Dev change

Checklist:

A new PR with the test suite will follow really soon

"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, we avoid Jest while testing Node.js applications in favour of other test frameworks (like TAP) due to some known issues.

Copy link
Contributor Author

@SamSalvatico SamSalvatico Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch!
I've used that because we have explicit request of do that in our docs

Anyway, thank you, I will update tests and docs!

@alfonsograziano
Copy link
Collaborator

@SamSalvatico I like the approach! Would be cool to see some usage examples as well. Can you please add just a basic usage example? Feel free to use the payments app :)

SamSalvatico and others added 4 commits April 24, 2024 16:23
* feature(logging-wrapper): added tests helper

* Added README for logging-wrapper

* Added tap

* Added gitignore

* Tap config

* Added tests for logging-wrapper.test.ts

* Added fastify tests

* Chore: Use logging-wrapper in payments-api (#160)

* Updated wrapper to be built

* Updated commands to build logging wrapper

* Removed useless files

* Payments api is using logging wrapper

* Updated error response management

* Updated version

* Fixed logging wrapper tests

* Updated packages

* Copy logging wrapper in the dockerfile

* Added error handling package

* Added package script

* Optional logging hooks

* Removed logging hooks

* Started working on error handling tests

* Started working on error handling tests

* Added tests for not found handler

* Added logging hooks

* Removed useless copy

* Renamed to error-handler

* Updated sdk definitions
@SamSalvatico
Copy link
Contributor Author

@GiuliaTeggi @Thurfjell I've merged previous PRs on this, splitting concerns between logging-wrapper and error-handler

@SamSalvatico SamSalvatico self-assigned this Apr 29, 2024
@SamSalvatico SamSalvatico enabled auto-merge (squash) April 29, 2024 12:32
Copy link
Contributor Author

@SamSalvatico SamSalvatico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readded

@SamSalvatico SamSalvatico enabled auto-merge (squash) April 30, 2024 07:29
@SamSalvatico SamSalvatico dismissed Thurfjell’s stale review April 30, 2024 07:33

to move on with merging

@SamSalvatico SamSalvatico merged commit ffdf288 into dev Apr 30, 2024
11 checks passed
@SamSalvatico SamSalvatico deleted the feature/configure-logging-wrapper branch April 30, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants