Configure org.apache.log4j.ConsoleAppender with custom classloader

前端 未结 2 632
灰色年华
灰色年华 2020-12-17 22:13

I have a java class which creates a custom classloader based on javassist class loader on start up and then run the real program class. I\'m getting the following error:

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-17 22:50

    Add log4j.ignoreTCL in maven tomcat plugin configuration as shown in below

    
       org.apache.tomcat.maven
       tomcat7-maven-plugin
       2.1
       
          ${local.server.port}
          true
          
             ${user.dir}\conf\log4j2.xml
             true
             org.apache.logging.log4j.jul.LogManager
          
          true
       
    
    

提交回复
热议问题