node-api-boilerplate icon indicating copy to clipboard operation
node-api-boilerplate copied to clipboard

Adding logging and refactoring repositories and operations

Open moda20 opened this issue 4 years ago • 0 comments

I added logging capabilities based on operations. logging in the operation means adding steps and their description. this can be done via predefined methods that take a description and extra data. the logs are stored to file on error only and are marked by a request ID that is injected. on a success, the trace id deleted forever.

added refactoring for the operations (logging methods) and the repositories. create a base repository for sequelize with the most common methods predefined. extending the base repository and injecting the sequelize model in the super constructor as well as the mapper is a mandatory step.

this only allows for one model and one mapper.

Changed readme to include logging mechanism description.

moda20 avatar Oct 29 '19 09:10 moda20