Browse Source

Bazel: enable logging for tests in org.eclipse.jgit.test

- use slf4j-simple for logging in test runs
- for log configuration see
https://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html

Change-Id: I9f0a532644b31162c867cd0d63f083296eaf6be5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.1
Matthias Sohn 5 years ago
parent
commit
06fc6c7cc0
  1. 1
      org.eclipse.jgit.test/BUILD
  2. 6
      org.eclipse.jgit.test/tst-rsrc/log4j.properties
  3. 9
      org.eclipse.jgit.test/tst-rsrc/simplelogger.properties

1
org.eclipse.jgit.test/BUILD

@ -42,6 +42,7 @@ java_library(
resources = DATA,
deps = [
"//lib:junit",
"//lib:slf4j-simple",
"//org.eclipse.jgit:jgit",
"//org.eclipse.jgit.junit:junit",
],

6
org.eclipse.jgit.test/tst-rsrc/log4j.properties

@ -7,8 +7,8 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
#log4j.appender.fileLogger.bufferedIO = true
#log4j.appender.fileLogger.bufferSize = 4096
log4j.appender.fileLogger.bufferedIO = true
log4j.appender.fileLogger.bufferSize = 4096
#log4j.logger.org.eclipse.jgit.util.FS = DEBUG
log4j.logger.org.eclipse.jgit.util.FS = DEBUG
#log4j.logger.org.eclipse.jgit.internal.storage.file.FileSnapshot = DEBUG

9
org.eclipse.jgit.test/tst-rsrc/simplelogger.properties

@ -0,0 +1,9 @@
org.slf4j.simpleLogger.logFile = System.err
org.slf4j.simpleLogger.cacheOutputStream = true
org.slf4j.simpleLogger.defaultLogLevel = info
org.slf4j.simpleLogger.showDateTime = true
org.slf4j.simpleLogger.dateTimeFormat = HH:mm:ss.SSSXXX
org.slf4j.simpleLogger.showThreadName = true
#org.slf4j.simpleLogger.log.org.eclipse.jgit.util.FS = debug
#org.slf4j.simpleLogger.log.org.eclipse.jgit.internal.storage.file.FileSnapshot = debug
Loading…
Cancel
Save