日志记录是Web软件项目中必不可少的功能,选择一种合适的设计方案实现尤为重要。本文基于Struts2拦截器优秀的设计思想,阐述日志记录的基本流程,并将Struts2的拦截器用于日志记录,给出详细的设计与实现过程。
Log record is an essential function in Web software project and choosing an appropriate design to achieve is particularly important.Based on good design ideas of Struts2 interceptors,this article expounds the basic process of logging,applies interceptors of Struts2 to log record and gives the detail process of design and implementation.