如果您的日志如下所示:
INFO : 10-Oct-2014 11:30:09,178: com.tcs.sgv.acl.service.AccessControlServiceImpl.getAllUserELement(): in global service loggedinPost---100016
INFO : 10-Oct-2014 11:30:09,179: com.tcs.sgv.acl.service.AccessControlServiceImpl.getAllUserELement(): userId...103002
INFO : 10-Oct-2014 11:30:09,180: com.tcs.sgv.acl.service.AccessControlServiceImpl.getAllUserELement(): locale...en_US –
您可以使用以下日志模式(菜单工具-> 显示 log4j 模式解析器编辑器):
type=log4j
pattern=LEVEL : TIMESTAMP CLASS: MESSAGE
dateFormat=dd-MMM-yyyy HH:mm:ss,SSS
name=Stackoverflow example
charset=UTF-8
不幸的是,类和方法用“。”分隔。并且日志查看器无法检测到哪个点将com.tcs.sgv.acl.service.AccessControlServiceImpl.getAllUserELement()
字段CLASS
与METHOD
.