Err in NodeJs, how to deal with it in actual projects?

  node.js, question

I would like to ask whether log(err) will be written in some places in NodeJs where it is obvious that err will not appear in actual projects of the company.
Is err written in the log file or in the database?

I feel this kind of thing is not certain.
Logging is required regardless of whether you are in the development or production environment. As for the development environment, logging is necessary and important information, such as some serious errors and exceptions.
The log is generally recorded in a file, and it is best to cut according to the date. On the one hand, it is convenient to read; on the other hand, it costs less. The database is originally a place where the business IO is large. Generally, no logging is done, but if necessary, it is also possible to do so with small logs.