A) I use a combination of morgan for request logging, and Winston for error logs.
B) I structure my logs into information logs, warning logs, request logs, and error logs.
The information logs are used for things like user sign-in, database modifications, and algorithm analysis.
Warning logs are things like the user was denied access, A resource is using up too much memory or taking too long, or a result that doesn't break the system, but could be a problem for the user.
Error logs are reserved for runtime errors or anything where a system actually failed to perform its job.
The request logs are handled by Morgan and they mainly log the request made to the server, the parsed query (using GraphQL), and the response to the user.
C) I store my logs in a logs folder on the production server. They are organized into 3 files based on the level of severity, and each log entry is prepended with a time stamp, and the userId if applicable.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A) I use a combination of morgan for request logging, and Winston for error logs.
B) I structure my logs into information logs, warning logs, request logs, and error logs.
C) I store my logs in a logs folder on the production server. They are organized into 3 files based on the level of severity, and each log entry is prepended with a time stamp, and the userId if applicable.