Log TraceNo for each request in web application using Log4j

﹥>﹥吖頭↗ 提交于 2019-12-24 10:58:55

问题


I have a class named TraceNoGenerator that works like a Sequence in an Oracle Database; I want to use this class to assign a trace number for each request that comes to my web application to log in a log file. When my application received an error, this trace number will display on a web page so that I can easily find the bug using this trace number in the log file.

How can I do this in Log4j?

来源:https://stackoverflow.com/questions/7089241/log-traceno-for-each-request-in-web-application-using-log4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!