I have a开发者_运维技巧n app (node.js) running on multiple servers. each server has its own log (request log, error log, etc).
The log file contains time, http request, sometimes with userId.
What program I can use to analyze log file? or if there is any node.js plug-in that can do it?
since logs are on multiple servers, should I combine them first before analyzing?
Or, should I store the error into DB instead? (like mongo)
Sounds like http://search.npmjs.org/#/winston might be useful for you, it can send logged data to a database. You shouldn't log stuff as plain text but as JSON objects so that you can easily query the logs in the DB.
精彩评论