Skip to content

Commit a496a04

Browse files
committed
adding http scan capability, had to move tests
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
1 parent 67c24f6 commit a496a04

File tree

57 files changed

+937
-709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+937
-709
lines changed

logback-classic-blackbox/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,24 @@
2222
<artifactId>logback-classic</artifactId>
2323
</dependency>
2424

25+
<dependency>
26+
<groupId>org.eclipse.jetty</groupId>
27+
<artifactId>jetty-server</artifactId>
28+
<version>${jetty.version}</version>
29+
<scope>test</scope>
30+
</dependency>
31+
32+
<dependency>
33+
<groupId>org.eclipse.jetty.ee10</groupId>
34+
<artifactId>jetty-ee10-servlet</artifactId>
35+
<version>${jetty.version}</version>
36+
</dependency>
37+
38+
2539
<dependency>
2640
<groupId>jakarta.servlet</groupId>
2741
<artifactId>jakarta.servlet-api</artifactId>
42+
<version>6.0.0</version>
2843
</dependency>
2944

3045
<dependency>
@@ -66,6 +81,7 @@
6681
</exclusion>
6782
</exclusions>
6883
</dependency>
84+
6985
</dependencies>
7086

7187
<build>

logback-classic/src/test/input/joran/roct/inclusion/topByResource.xml renamed to logback-classic-blackbox/src/test/blackboxInput/joran/roct/inclusion/topByResource.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE x>
33

44

5-
<configuration scan="true" scanPeriod="5 milliseconds">
5+
<configuration debug="true" scan="true" scanPeriod="5 milliseconds">
66
<include resource="asResource/inner1.xml"/>
77
</configuration>
88

logback-classic/src/test/input/joran/roct/inclusion/topLevel0.xml renamed to logback-classic-blackbox/src/test/blackboxInput/joran/roct/inclusion/topLevel0.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<configuration scan="true" scanPeriod="5 milliseconds">
55

6-
<include file="src/test/input/joran/roct/inclusion/inner0.xml"/>
6+
<include file="src/test/blackboxInput/joran/roct/inclusion/inner0.xml"/>
77

88
</configuration>
9-
9+
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<configuration scan="true" scanPeriod="25 millisecond">
33

4-
<appender name="default" class="ch.qos.logback.classic.RecursivelyLoggingAppender474">
4+
<appender name="default" class="ch.qos.logback.classic.blackbox.joran.RecursivelyLoggingAppender474">
55
</appender>
66

77
<logger name="Ignore" level="ERROR" additivity="false"/>
@@ -11,4 +11,4 @@
1111
</root>
1212

1313
</configuration>
14-
14+

logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic135/LoggingRunnable.java renamed to logback-classic-blackbox/src/test/java/ch/qos/logback/classic/blackbox/issue/lbclassic135/LoggingRunnable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/**
1+
/*
22
* Logback: the reliable, generic, fast and flexible logging framework.
3-
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
3+
* Copyright (C) 1999-2024, QOS.ch. All rights reserved.
44
*
55
* This program and the accompanying materials are dual-licensed under
66
* either the terms of the Eclipse Public License v1.0 as published by
@@ -11,10 +11,10 @@
1111
* under the terms of the GNU Lesser General Public License version 2.1
1212
* as published by the Free Software Foundation.
1313
*/
14-
package ch.qos.logback.classic.issue.lbclassic135;
14+
package ch.qos.logback.classic.blackbox.issue.lbclassic135;
1515

1616
import org.slf4j.Logger;
17-
import ch.qos.logback.core.contention.RunnableWithCounterAndDone;
17+
import ch.qos.logback.core.testUtil.RunnableWithCounterAndDone;
1818

1919
public class LoggingRunnable extends RunnableWithCounterAndDone {
2020

logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic135/LoggingToFileThroughput.java renamed to logback-classic-blackbox/src/test/java/ch/qos/logback/classic/blackbox/issue/lbclassic135/LoggingToFileThroughput.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/**
1+
/*
22
* Logback: the reliable, generic, fast and flexible logging framework.
3-
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
3+
* Copyright (C) 1999-2024, QOS.ch. All rights reserved.
44
*
55
* This program and the accompanying materials are dual-licensed under
66
* either the terms of the Eclipse Public License v1.0 as published by
@@ -11,15 +11,15 @@
1111
* under the terms of the GNU Lesser General Public License version 2.1
1212
* as published by the Free Software Foundation.
1313
*/
14-
package ch.qos.logback.classic.issue.lbclassic135;
14+
package ch.qos.logback.classic.blackbox.issue.lbclassic135;
1515

1616
import ch.qos.logback.classic.Logger;
1717
import ch.qos.logback.classic.LoggerContext;
1818
import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
1919
import ch.qos.logback.classic.spi.ILoggingEvent;
2020
import ch.qos.logback.core.FileAppender;
21-
import ch.qos.logback.core.contention.RunnableWithCounterAndDone;
22-
import ch.qos.logback.core.contention.ThreadedThroughputCalculator;
21+
import ch.qos.logback.core.testUtil.RunnableWithCounterAndDone;
22+
//import ch.qos.logback.core.contention.ThreadedThroughputCalculator;
2323

2424
/**
2525
* Short sample code testing the throughput of a fair lock.
@@ -33,20 +33,20 @@ public class LoggingToFileThroughput {
3333

3434
public static void main(String args[]) throws InterruptedException {
3535

36-
ThreadedThroughputCalculator tp = new ThreadedThroughputCalculator(OVERALL_DURATION_IN_MILLIS);
37-
tp.printEnvironmentInfo("lbclassic135 LoggingToFileThrouhput");
38-
39-
LoggerContext lc = new LoggerContext();
40-
Logger logger = buildLoggerContext(lc);
41-
42-
for (int i = 0; i < 2; i++) {
43-
tp.execute(buildArray(logger));
44-
}
45-
46-
RunnableWithCounterAndDone[] runnnableArray = buildArray(logger);
47-
tp.execute(runnnableArray);
48-
tp.printThroughput(runnnableArray, "File: ");
49-
lc.stop();
36+
// ThreadedThroughputCalculator tp = new ThreadedThroughputCalculator(OVERALL_DURATION_IN_MILLIS);
37+
// tp.printEnvironmentInfo("lbclassic135 LoggingToFileThrouhput");
38+
//
39+
// LoggerContext lc = new LoggerContext();
40+
// Logger logger = buildLoggerContext(lc);
41+
//
42+
// for (int i = 0; i < 2; i++) {
43+
// tp.execute(buildArray(logger));
44+
// }
45+
//
46+
// RunnableWithCounterAndDone[] runnnableArray = buildArray(logger);
47+
// tp.execute(runnnableArray);
48+
// tp.printThroughput(runnnableArray, "File: ");
49+
// lc.stop();
5050
}
5151

5252
static Logger buildLoggerContext(LoggerContext lc) {

logback-classic/src/test/java/ch/qos/logback/classic/joran/ChangeDetectedListener.java renamed to logback-classic-blackbox/src/test/java/ch/qos/logback/classic/blackbox/joran/ChangeDetectedListener.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Logback: the reliable, generic, fast and flexible logging framework.
3-
* Copyright (C) 1999-2022, QOS.ch. All rights reserved.
3+
* Copyright (C) 1999-2024, QOS.ch. All rights reserved.
44
*
55
* This program and the accompanying materials are dual-licensed under
66
* either the terms of the Eclipse Public License v1.0 as published by
@@ -12,8 +12,9 @@
1212
* as published by the Free Software Foundation.
1313
*/
1414

15-
package ch.qos.logback.classic.joran;
15+
package ch.qos.logback.classic.blackbox.joran;
1616

17+
import ch.qos.logback.classic.joran.ReconfigureOnChangeTask;
1718
import ch.qos.logback.core.spi.ConfigurationEvent;
1819
import ch.qos.logback.core.spi.ConfigurationEventListener;
1920

@@ -33,7 +34,7 @@ class ChangeDetectedListener implements ConfigurationEventListener {
3334
public void listen(ConfigurationEvent configurationEvent) {
3435
switch (configurationEvent.getEventType()) {
3536
case CHANGE_DETECTED:
36-
System.out.println(this.toString() + "#listen Change detected " + configurationEvent +" count="+countDownLatch.getCount());
37+
//System.out.println(this.toString() + "#listen Change detected " + configurationEvent +" count="+countDownLatch.getCount());
3738

3839
countDownLatch.countDown();
3940
Object data = configurationEvent.getData();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy