If the requirements for log analysis are relatively high, you can use bunyan to write logs. Features:
Advantages: The logs are all in json format, and each line is a record, which is very easy to analyze
Disadvantages: The logs are in json format and are not for people to see
Based on the above, what you have to do is very simple. Write a simple script, read the log, parse json, and generate reports according to product requirements. As shown in the figure below, analysis is extremely convenient.
Can be saved in the database.
Or save it in the log and process it with hadoop
Your requirement is for user operation logs. Just use mysql or other data to store them. log4js is generally used to record system logs
If the requirements for log analysis are relatively high, you can use
bunyan
to write logs. Features:Advantages: The logs are all in json format, and each line is a record, which is very easy to analyze
Disadvantages: The logs are in json format and are not for people to see
Based on the above, what you have to do is very simple. Write a simple script, read the log, parse json, and generate reports according to product requirements. As shown in the figure below, analysis is extremely convenient.
Portal: https://github.com/trentm/nod...