You need 4 jar packages first. As follows
Http://pan.baidu.com/s/1i4k3fiH
The following package is included in the interim and can be placed in the project Lib.
In addition to the need for a configuration file, the sharing link is as follows. Http://pan.baidu.com/s/1o7qy2Ky put the configuration file in the location. Name yourself, then go to the project and use it.
Import Org.slf4j.Logger;
Import Org.slf4j.LoggerFactory;
Private static final Logger log = Loggerfactory.getlogger (User.class);
@RequestMapping (value= "/showlist") public String Showlist (model model) {Log.info ("<<<<<<<< Home display start>>>>>>>> "," Usermanager "," showlist "); List<user>userlist=userdaoimpl.getlist (); Model.addattribute ("UserList", userlist); Log.info ("<<< <<<<< Home Display end>>>>>>>> "," Usermanager "," showlist "); return" index ";}
After that, please note that the XML file itself is going to configure the log file path. All right, so much for that.
The Java environment log4j the configuration of the logging environment.