Advice on e-commerce logging strategy
- by yalestar
I recently inherited an e-commerce app (Java/Struts) that I'm porting to Rails.
The thing is, we frequently have to do forensics on orders by poring through the log files, and with the old app's logs (log4j wall of text) it's pretty hard to make sense of the individual orders when several people are placing orders simultaneously.
So I'm soliciting advice on a good strategy for logging of these orders, like maybe logging each individual order to its own MongoDB collection based on unique cart ID? Or maybe group them by IP address? Something different entirely?
Essentially, what is the best approach for logging of an online store so that it's easy to backtrace each user's interaction with the site?