s
Log4j 1.x版 引发线程blocked死锁问题 / 使用apache log解决高并发下log4j引起大量线程block问题
http://www.aiprograming.com/b/pengpeng/23
http://zl378837964.iteye.com/blog/2373591
http://m.blog.csdn.net/article/details?id=52401328
Apache Log4j是一个基于Java的日志记录工具,用起来非常方便,但是Log4j 1.x如果使用不慎,会引起死锁问题,进行导致整个网站的宕机
WebLog Expert V5.6 Beta 3
http://wt.duote.com/soft/6057.html
http://70.duote.com.cn/wlexpert.exe
WebLog Expert 能够分析网站的流量记录,将原始的流量记录分析出Activity statistics、Access statistics、Information about visitors、Referrers、Information about errors等基本而重要的流量信息,帮助你了解网友对于你的网站的使用状况。
webloger digger ?
http://guoqinhua1986-126-com.iteye.com/blog/231244
********************LOG4J配置文件 log4j.properties***********
# Configure logging for testing: optionally with log file
log4j.rootLogger=WARN, stdout
# log4j.rootLogger=WARN, stdout, logfile
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.appender.logfile=org.apache.log4j.FileAppender
log4j.appender.logfile.File=target/spring.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
package com.idemfactor.crm.dao; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import com.idemfactor.crm.model.Role; /** * Data access object (DAO) for domain model class Role. * * @see com.idemfactor.crm.model.Role * @author MyEclipse Persistence Tools */ public class RoleDAO extends HibernateDaoSupport { private static final Log log = LogFactory.getLog(RoleDAO.class); // property constants public static final String ROLE_NAME = "roleName"; protected void initDao() { // do nothing } public void save(Role transientInstance) { log.debug("saving Role instance"); getHibernateTemplate().save(transientInstance); log.debug("save successful"); } public void delete(Role persistentInstance) { log.debug("deleting Role instance"); getHibernateTemplate().delete(persistentInstance); log.debug("delete successful"); } public Role findById(java.lang.Integer id) { log.debug("getting Role instance with id: " + id); Role instance = (Role) getHibernateTemplate().get( "com.idemfactor.crm.model.Role", id); return instance; } public List<Role> findByExample(Role instance) { log.debug("finding Role instance by example"); List<Role> results = getHibernateTemplate().findByExample(instance); log.debug("find by example successful, result size: " + results.size()); return results; } public List<Role> findByProperty(String propertyName, Object value) { log.debug("finding Role instance with property: " + propertyName + ", value: " + value); String queryString = "from Role as model where model." + propertyName + "= ?"; return getHibernateTemplate().find(queryString, value); } public List<Role> findAll() { log.debug("finding all Role instances"); String queryString = "from Role"; return getHibernateTemplate().find(queryString); } public Role merge(Role detachedInstance) { log.debug("merging Role instance"); Role result = (Role) getHibernateTemplate().merge(detachedInstance); log.debug("merge successful"); return result; } public void attachDirty(Role instance) { log.debug("attaching dirty Role instance"); getHibernateTemplate().saveOrUpdate(instance); log.debug("attach successful"); } public void attachClean(Role instance) { log.debug("attaching clean Role instance"); getHibernateTemplate().lock(instance, LockMode.NONE); log.debug("attach successful"); } }
log4j.properties
log4j.rootLogger=info, stdout log4j.logger.com.idemfactor=debug log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=[%d{ISO8601}] %5p [%t] (%c{1}:%L) - %m%n #log4j.appender.R=org.apache.log4j.RollingFileAppender #log4j.appender.R.layout=org.apache.log4j.PatternLayout #log4j.appender.R.layout.ConversionPattern=[%d{ISO8601}] %5p [%t] (%c{1}:%L) - %m%n #log4j.appender.R.File=/tmp/fs.log #log4j.appender.R.MaxFileSize=1000KB #log4j.appender.R.MaxBackupIndex=7 # Need this to show all exception details in struts log4j.logger.org.apache.struts.action.ExceptionHandler=debug
end
相关推荐
log4j-slf4j+logback1.3.0 共六个jar包
https://github.com/tomcat-slf4j-logback/tomcat-slf4j-logback上的jar与源码,网络不好,下载不易,特此分享。包括: logback-1.2.3.zip Tomcat7.0.82\tomcat-juli-7.0.82-slf4j-1.7.25-logback-1.2.3.zip Tomcat...
NULL 博文链接:https://tristan-s.iteye.com/blog/1966020
NULL 博文链接:https://nethub2.iteye.com/blog/2380050
log4j 和 logback配置资源 log4j和logback相关架包.zip
十个log4j转移到LogBack的理由,接替log4j
几乎是网上 能找到的 日志脱敏的所有实现 1、基于正则表达式的 日志脱敏实现 ,扩展logback 、log4j 2、springmvc 返回报文脱敏。 3、基于注解方式的脱敏。 大家选择使用。
无论从设计上还是实现上,Logback相对log4j而言有了相对多的改进。所以下面这篇文章主要给大家介绍了关于如何将应用的log4j换成logback的相关资料,文中介绍的很详细,需要的朋友可以参考下。
2. log4j2 的配置详解,JDBC 配置,CloseableThreadContext 的使用(自定义输出日志文件 例如 logback MDC) 3.logback 的XML配置与使用,MDC的使用,SiftingAppender,DBAppender(c3p0,druid) 详细查看代码:README.md ...
slf4j,logback.xml
Mybatis日志Log4j与Logback
Slf4j+logback实现logback测试,Slf4j+logback实现logback测试
Tomcat SLF4J Logback是tomcat的替代产品,它允许所有内部日志记录全部使用我们喜欢的slf4j / logback库。 注意 从logback 1.1.7开始,不再需要在server.xml中包含${catalina.home}来进行logback访问。 我们还重新...
slf4j+logback需要的jar和配置文件,下载之后可以直接使用
NULL 博文链接:https://xiayingjie.iteye.com/blog/828498
commons-logging-1.2.jar、log4j-1.2.17.jar、logback-classic-1.1.2.jar、logback-core-1.1.2.jar、slf4j-api-1.7.12.jar、slf4j-jcl-1.7.12.jar、slf4j-simple-1.7.12.jar
logback+slf4j 异步日志输出到不同级别的文件-配置文件,下载即可使用。结合lombok【@slf4j】即可方便愉快的输出日志了 666
janino-2.3.17.jar jcl-over-slf4j-1.6.1.jar log4j-1.2.8.jar logback-access-0.9.24.jar logback-classic-0.9.24.jar logback-core-0.9.24.jar ... slf4j-1.6.1+logback-0.9.24.rar slf4j-api-1.6.1.jar
快速了解常用日志技术(JCL、Slf4j、JUL、Log4j、Logback、Log4j2)-附件资源