开发者

what should I do to analyze the log file

开发者 https://www.devze.com 2023-04-07 00:26 出处:网络
I have a开发者_运维技巧n app (node.js) running on multiple servers.each server has its own log (request log, error log, etc).

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消