有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java commons日志记录打印时间戳的长度,而不是漂亮的日期格式

我正在使用apachecommons日志记录

   <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
    </dependency>

<dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
        <version>1.1.0.RELEASE</version>
    </dependency>

日志记录者用来像这样打印日期

  20-Aug-2015 13:15:39.740 INFO [http-nio-8080-exec-3] com.myapp.myclass Method 'mymethod' executed. Processing time: 2 ms

像这样打印但是现在

      91522432 [http-nio-8080-exec-3] INFO com.myapp.myclass Method 'mymethod' executed. Processing time: 2 ms <br/>

在警告日志中:

   SLF4J: The requested version 1.5.8 by your slf4j binding is not  compatible with [1.6]
   SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details

存在冲突,因为spring数据jpa导入了另一个版本。 我如何在pom中排除这一点


共 (0) 个答案