Skip to content

Improve winston logging module and morgan #81

@GAndanje

Description

@GAndanje

This module is currently logging success requests but not errors
Besides its opinionated. It only logs requests where you restructure your controller with

const { data } = await userService.getAllUsers() 
res.status(statusCode).json({ data })
  1. Otherwise it fails if you do something hacky like this
const { users } = await userService.getAllUsers()
res.status(statusCode).json({ data: users })

Advise is welcome. In the controller should i go with approach 1 or 2 🤔

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions