No log4j2 configuration file found. Using default configuration: logging only errors to the console

前端 未结 15 1123
情深已故
情深已故 2020-12-04 22:59
$ java -Dlog4j.configuration=file:///path/to/your/log4j2.xml -jar /path/to/your/jar_file.jar

Written to the console, you get

ERROR          


        
15条回答
  •  天命终不由人
    2020-12-04 23:45

    I am working on TestNG Maven project, This worked for me by adding tag in pom.xml, this happens to be the path of my custom configuration file log4j2.xml.

    http://maven.apache.org
    
      UTF-8
      UTF-8
    
    
      
        
          src/main/java/resources
          true
        
      
      
        
          
            org.apache.maven.plugins
            maven-surefire-plugin
            3.0.0-M3
            
              
                testng.xml
              
            
          
        
      
    
    
      
    

提交回复
热议问题