2016-09-20 3 views
1

имя класса не печатает журнал. Найдите ниже log4j2.xml и pom.xml. пожалуйста, помогите по этому поводу. я попытался следующими вариантамиимя класса отсутствует в Log4j2 - spring boot 1.3.7

  1. с весной загрузкой протоколирования стартера - не работает
  2. с пружинными загрузками стартера входа с log4j2 - не работает

Пожалуйста, проверьте консоль. Первые четыре строки содержит имя класса, но после того, что он не пришедшего

Log4j2.xml

<?xml version="1.0" encoding="UTF-8"?> 
<Configuration status="WARN" monitorInterval="30"> 
    <Properties> 
     <Property name="logpattern">%d{DATE} [${sys:PID}] [%t] %-5p %c-[%L] %X - %m%n</Property> 
    </Properties> 
    <Appenders> 
     <Console name="Console" target="SYSTEM_OUT" follow="true"> 
      <PatternLayout pattern="${logpattern}"/> 
     </Console> 
    </Appenders> 
    <Loggers> 
     <Root level="info"> 
      <AppenderRef ref="Console"/> 
     </Root> 
    </Loggers> 
</Configuration> 

pom.xml

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

    <groupId>com.sample</groupId> 
    <artifactId>Sample</artifactId> 
    <version>0.1.0</version> 
    <packaging>jar</packaging> 

    <name>Sample</name> 
    <description>Sample Description</description> 

    <parent> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-parent</artifactId> 
     <version>1.3.7.RELEASE</version> 
     <relativePath /> <!-- lookup parent from repository --> 
    </parent> 

    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 
     <java.version>1.8</java.version> 
    </properties> 

    <dependencies> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-web</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-test</artifactId> 
      <scope>test</scope> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.restdocs</groupId> 
      <artifactId>spring-restdocs-mockmvc</artifactId> 
      <scope>test</scope> 
     </dependency> 

     <dependency> 
      <groupId>com.jayway.jsonpath</groupId> 
      <artifactId>json-path</artifactId> 
      <scope>test</scope> 
     </dependency> 

     <dependency> 
      <groupId>com.oracle</groupId> 
      <artifactId>ojdbc</artifactId> 
      <version>6</version> 
     </dependency> 

     <dependency> 
      <groupId>com.valuemomentum</groupId> 
      <artifactId>ratingService3X</artifactId> 
      <version>1</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 --> 
     <dependency> 
      <groupId>org.apache.commons</groupId> 
      <artifactId>commons-collections4</artifactId> 
      <version>4.1</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-data-jpa</artifactId> 
      <exclusions> 
       <exclusion> 
        <groupId>org.springframework.boot</groupId> 
        <artifactId>spring-boot-starter</artifactId> 
       </exclusion> 
       <exclusion> 
        <groupId>org.apache.tomcat</groupId> 
        <artifactId>tomcat-jdbc</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> 
     <dependency> 
      <groupId>org.apache.commons</groupId> 
      <artifactId>commons-lang3</artifactId> 
      <version>3.4</version> 
     </dependency> 

     <dependency> 
      <groupId>commons-beanutils</groupId> 
      <artifactId>commons-beanutils</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>commons-beanutils</groupId> 
      <artifactId>commons-beanutils-core</artifactId> 
      <version>1.8.0</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans --> 
     <dependency> 
      <groupId>org.apache.xmlbeans</groupId> 
      <artifactId>xmlbeans</artifactId> 
      <version>2.6.0</version> 
     </dependency> 

     <dependency> 
      <groupId>org.codehaus.jackson</groupId> 
      <artifactId>jackson-core-asl</artifactId> 
      <version>1.9.13</version> 
     </dependency> 

     <dependency> 
      <groupId>com.fasterxml.jackson.jaxrs</groupId> 
      <artifactId>jackson-jaxrs-json-provider</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.codehaus.jackson</groupId> 
      <artifactId>jackson-mapper-asl</artifactId> 
      <version>1.9.13</version> 
     </dependency> 

     <dependency> 
      <groupId>com.fasterxml.jackson.dataformat</groupId> 
      <artifactId>jackson-dataformat-xml</artifactId> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.codehaus.woodstox/woodstox-core-asl --> 
     <dependency> 
      <groupId>org.codehaus.woodstox</groupId> 
      <artifactId>woodstox-core-asl</artifactId> 
      <version>4.4.1</version> 
     </dependency> 

     <!-- Calling ifoundry - dependency jars --> 

     <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-kernel --> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-kernel</artifactId> 
      <version>1.7.3</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-adb --> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-adb</artifactId> 
      <version>1.7.3</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-http --> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-transport-http</artifactId> 
      <version>1.7.3</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-local --> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-transport-local</artifactId> 
      <version>1.7.3</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-xmlbeans --> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-xmlbeans</artifactId> 
      <version>1.7.3</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxws --> 
     <dependency> 
      <groupId>org.apache.axis2</groupId> 
      <artifactId>axis2-jaxws</artifactId> 
      <version>1.7.3</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/javax.el/javax.el-api --> 
     <!-- <dependency> <groupId>javax.el</groupId> <artifactId>javax.el-api</artifactId> 
      <version>3.0.0</version> <scope>provided</scope> </dependency> --> 

     <!-- https://mvnrepository.com/artifact/org.glassfish.web/el-impl --> 
     <!-- <dependency> <groupId>org.glassfish.web</groupId> <artifactId>el-impl</artifactId> 
      <version>2.2</version> <scope>provided</scope> </dependency> --> 

     <!-- https://mvnrepository.com/artifact/org.glassfish.web/javax.el --> 
     <dependency> 
      <groupId>org.glassfish.web</groupId> 
      <artifactId>javax.el</artifactId> 
      <version>2.2.6</version> 
      <scope>provided</scope> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui --> 
     <dependency> 
      <groupId>io.springfox</groupId> 
      <artifactId>springfox-swagger-ui</artifactId> 
      <version>2.5.0</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --> 
     <dependency> 
      <groupId>io.springfox</groupId> 
      <artifactId>springfox-swagger2</artifactId> 
      <version>2.5.0</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/fop --> 
     <dependency> 
      <groupId>org.apache.xmlgraphics</groupId> 
      <artifactId>fop</artifactId> 
      <version>2.1</version> 
     </dependency> 

     <dependency> 
      <groupId>com.zaxxer</groupId> 
      <artifactId>HikariCP</artifactId> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-jms</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.activemq</groupId> 
      <artifactId>activemq-broker</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-messaging</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter</artifactId> 
      <exclusions> 
       <exclusion> 
        <groupId>org.springframework.boot</groupId> 
        <artifactId>spring-boot-starter-logging</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-log4j2</artifactId> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.graylog2.log4j2/log4j2-gelf --> 
     <dependency> 
      <groupId>org.graylog2.log4j2</groupId> 
      <artifactId>log4j2-gelf</artifactId> 
      <version>1.3.0</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/joda-time/joda-time --> 
     <dependency> 
      <groupId>joda-time</groupId> 
      <artifactId>joda-time</artifactId> 
      <version>2.9.4</version> 
     </dependency> 

     <dependency> 
      <groupId>de.codecentric</groupId> 
      <artifactId>spring-boot-admin-starter-client</artifactId> 
      <version>1.3.6</version> 
     </dependency> 


    </dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-maven-plugin</artifactId> 
      </plugin> 
     </plugins> 
    </build> 

    <repositories> 
     <repository> 
      <id>internal</id> 
      <name>Archiva Managed Internal Repository</name> 
      <url>http://10.50.255.230:8888/repository/internal/</url> 
     </repository> 
    </repositories> 


</project> 

консоль

20 Sep 2016 18:58:14,864 [9684] [main] INFO org.hibernate.cfg.Environment-[346] {} - HHH000021: Bytecode provider name : javassist 
20 Sep 2016 18:58:15,136 [9684] [main] INFO org.hibernate.annotations.common.Version-[66] {} - HCANN000001: Hibernate Commons Annotations {4.0.5.Final} 
20 Sep 2016 18:58:15,315 [9684] [main] INFO org.hibernate.dialect.Dialect-[145] {} - HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect 
20 Sep 2016 18:58:15,569 [9684] [main] INFO org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory-[47] {} - HHH000397: Using ASTQueryTranslatorFactory 
20 Sep 2016 18:58:16,195 [9684] [main] INFO -[45] {} - HibernateJpaSessionFactoryBean called 
20 Sep 2016 18:58:19,573 [9684] [main] INFO -[99] {} - requestString::: { 
    "auth" : { 
+0

так что именно не хватает? – Stultuske

+0

класс name. пожалуйста, проверьте консоль здесь первые четыре журнала, имя класса доступно, но после этого оно недоступно –

ответ

2

В макете заменить нижний регистр %c (имя регистратора) в верхнем регистре %C (класс, где был выведен регистратор).

Смежные вопросы