seed
seed copied to clipboard
feat(back): add logger decorator
Right now LogService usage is a nasty overwhelming boilerplate.
Every controller's endpoint and command/query/event handler function look like this:
async methodName(...params): ReturnType {
return this.logger.trackSegment(this.methodName.name, async () => {
... actual code ...
}, {params});
}
It would be neat to simplify this to just:
@Logger()
async methodName(...params): ReturnType {
... actual code ...
}