This is an automated email from the ASF dual-hosted git repository. lgoldstein pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mina-sshd.git
commit a22514bb5a2692c7b510fbef3fdcdc86995d620d Author: Lyor Goldstein <lgoldst...@apache.org> AuthorDate: Thu Dec 10 12:09:41 2020 +0200 [SSHD-1109] Replace log4j with logback as the slf4j logger implementation for tests --- CHANGES.md | 1 + pom.xml | 74 ++++++++++------------ sshd-cli/src/test/resources/.gitignore | 1 + sshd-cli/src/test/resources/log4j.properties | 38 ----------- sshd-common/pom.xml | 2 + .../sshd/common/util/logging/LoggingUtils.java | 13 ++++ .../apache/sshd/util/test/JUnitTestSupport.java | 43 +++++++++++++ sshd-common/src/test/resources/log4j.properties | 38 ----------- sshd-common/src/test/resources/logback-test.xml | 47 ++++++++++++++ sshd-contrib/src/test/resources/log4j.properties | 38 ----------- .../org/apache/sshd/util/test/BaseTestSupport.java | 11 ---- sshd-core/src/test/resources/log4j.properties | 38 ----------- sshd-git/src/test/resources/log4j.properties | 38 ----------- sshd-ldap/src/test/resources/log4j.properties | 38 ----------- sshd-mina/src/test/resources/.gitignore | 1 + sshd-netty/src/test/resources/.gitignore | 1 + sshd-openpgp/src/test/resources/log4j.properties | 38 ----------- sshd-putty/src/test/resources/log4j.properties | 38 ----------- sshd-scp/src/main/resources/.gitignore | 1 + sshd-scp/src/test/resources/.gitignore | 1 + sshd-scp/src/test/resources/log4j.properties | 38 ----------- sshd-sftp/src/test/resources/.gitignore | 1 + sshd-sftp/src/test/resources/log4j.properties | 39 ------------ sshd-spring-sftp/src/main/resources/.gitignore | 1 + sshd-spring-sftp/src/test/resources/.gitignore | 1 + 25 files changed, 149 insertions(+), 431 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 10cf108..0da7379 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -23,3 +23,4 @@ ## Behavioral changes and enhancements * [SSHD-1085](https://issues.apache.org/jira/browse/SSHD-1085) Added more notifications related to channel state change for detecting channel closing or closed earlier. +* [SSHD-1109](https://issues.apache.org/jira/browse/SSHD-1109) Replace log4j with logback as the slf4j logger implementation for tests diff --git a/pom.xml b/pom.xml index c3fb369..e5e6ecc 100644 --- a/pom.xml +++ b/pom.xml @@ -106,6 +106,7 @@ <groovy.version>3.0.6</groovy.version> <bouncycastle.version>1.67</bouncycastle.version> <slf4j.version>1.7.30</slf4j.version> + <logback.version>1.2.3</logback.version> <spring.version> 5.3.1</spring.version> <jgit.version>5.9.0.202009080501-r</jgit.version> <junit.version>4.13.1</junit.version> @@ -449,11 +450,6 @@ </dependency> <dependency> <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>${slf4j.version}</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> <artifactId>slf4j-jdk14</artifactId> <version>${slf4j.version}</version> </dependency> @@ -462,6 +458,19 @@ <artifactId>slf4j-simple</artifactId> <version>${slf4j.version}</version> </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>${logback.version}</version> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>${logback.version}</version> + </dependency> + <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> @@ -511,37 +520,6 @@ </dependency> <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.17</version> - <exclusions> - <exclusion> - <groupId>javax.jms</groupId> - <artifactId>jms</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jmx</groupId> - <artifactId>jmxri</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jdmk</groupId> - <artifactId>jmxtools</artifactId> - </exclusion> - <exclusion> - <groupId>ant</groupId> - <artifactId>ant-nodeps</artifactId> - </exclusion> - <exclusion> - <groupId>ant</groupId> - <artifactId>ant-junit</artifactId> - </exclusion> - <exclusion> - <groupId>ant-contrib</groupId> - <artifactId>ant-contrib</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> @@ -627,6 +605,18 @@ <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.pgm</artifactId> <version>${jgit.version}</version> + <!-- We provide our own slf4j logging - needed for tests only --> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> @@ -656,8 +646,13 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> <scope>test</scope> </dependency> <dependency> @@ -1331,7 +1326,7 @@ <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle> </resourceBundles> <supplementalModels> - <supplementalModel>${workspace.root.dir}/assembly/src/main/legal/notices.xml</supplementalModel> + <supplementalModel>${workspace.root.dir}${file.separator}assembly${file.separator}src${file.separator}main${file.separator}legal${file.separator}notices.xml</supplementalModel> </supplementalModels> <properties> <projectName>Apache MINA SSHD</projectName> @@ -1464,6 +1459,7 @@ <java.awt.headless>true</java.awt.headless> <org.slf4j.simpleLogger.logFile>System.out</org.slf4j.simpleLogger.logFile> <org.apache.sshd.test.timeout.factor>${sshd.tests.timeout.factor}</org.apache.sshd.test.timeout.factor> + <logback.configurationFile>${workspace.root.folder}${file.separator}sshd-common${file.separator}src${file.separator}test${file.separator}resources${file.separator}logback-test.xml</logback.configurationFile> </systemPropertyVariables> <trimStackTrace>false</trimStackTrace> <!-- lets re-run the failed test one more time, just to be sure --> diff --git a/sshd-cli/src/test/resources/.gitignore b/sshd-cli/src/test/resources/.gitignore new file mode 100644 index 0000000..99e3531 --- /dev/null +++ b/sshd-cli/src/test/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder \ No newline at end of file diff --git a/sshd-cli/src/test/resources/log4j.properties b/sshd-cli/src/test/resources/log4j.properties deleted file mode 100644 index 51c6fee..0000000 --- a/sshd-cli/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n -log4j.appender.logfile.file=target/sshd-cli-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-common/pom.xml b/sshd-common/pom.xml index a1a110b..6c8cd8c 100644 --- a/sshd-common/pom.xml +++ b/sshd-common/pom.xml @@ -97,6 +97,8 @@ <configuration> <includes> <include>org/apache/sshd/util/test/**/*</include> + <!-- Use the same configuration for all tests logging --> + <include>logback-test.xml</include> </includes> </configuration> </execution> diff --git a/sshd-common/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java b/sshd-common/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java index 263924b..13acb4d 100644 --- a/sshd-common/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java +++ b/sshd-common/src/main/java/org/apache/sshd/common/util/logging/LoggingUtils.java @@ -25,10 +25,12 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; +import java.util.EnumSet; import java.util.List; import java.util.Map; import java.util.NavigableMap; import java.util.Objects; +import java.util.Set; import java.util.TreeMap; import java.util.function.Consumer; import java.util.function.Predicate; @@ -45,11 +47,22 @@ import org.slf4j.helpers.MessageFormatter; * @author <a href="mailto:d...@mina.apache.org">Apache MINA SSHD Project</a> */ public final class LoggingUtils { + public static final Set<org.slf4j.event.Level> SLF4J_LEVELS + = Collections.unmodifiableSet(EnumSet.allOf(org.slf4j.event.Level.class)); private LoggingUtils() { throw new UnsupportedOperationException("No instance"); } + public static org.slf4j.event.Level slf4jLevelFromName(String name) { + return GenericUtils.isEmpty(name) + ? null + : SLF4J_LEVELS.stream() + .filter(l -> name.equalsIgnoreCase(l.name())) + .findAny() + .orElse(null); + } + /** * Scans using reflection API for all fields that are {@code public static final} that start with the given common * prefix (case <U>sensitive</U>) and are of type {@link Number}. diff --git a/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java b/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java index a5211f0..98d870f 100644 --- a/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java +++ b/sshd-common/src/test/java/org/apache/sshd/util/test/JUnitTestSupport.java @@ -58,10 +58,14 @@ import org.apache.sshd.common.config.keys.KeyUtils; import org.apache.sshd.common.keyprovider.KeyPairProvider; import org.apache.sshd.common.util.GenericUtils; import org.apache.sshd.common.util.io.IoUtils; +import org.apache.sshd.common.util.logging.LoggingUtils; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.Rule; import org.junit.rules.TestName; import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.slf4j.bridge.SLF4JBridgeHandler; /** @@ -78,6 +82,8 @@ public abstract class JUnitTestSupport extends Assert { public static final String TEST_SUBFOLDER = "test"; public static final String RESOURCES_SUBFOLDER = "resources"; + public static final org.slf4j.event.Level DEFAULT_LOGGING_LEVEL = org.slf4j.event.Level.INFO; + // useful test sizes for keys public static final List<Integer> DSS_SIZES = Collections.unmodifiableList(Arrays.asList(512, 768, 1024)); public static final List<Integer> RSA_SIZES = Collections.unmodifiableList(Arrays.asList(1024, 2048, 3072, 4096)); @@ -93,6 +99,43 @@ public abstract class JUnitTestSupport extends Assert { replaceJULLoggers(); } + @BeforeClass + public static void setupRootLoggerLevel() { + String levelName = System.getProperty( + "org.apache.sshd.test.root.log.level", DEFAULT_LOGGING_LEVEL.toString()); + org.slf4j.event.Level level = LoggingUtils.slf4jLevelFromName(levelName); + if (level == null) { + level = DEFAULT_LOGGING_LEVEL; + } + + replaceJULLoggers(); + + Logger rootLogger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); + if (rootLogger instanceof ch.qos.logback.classic.Logger) { + Class<?> clazz = rootLogger.getClass(); + ch.qos.logback.classic.Level rawLevel = getRawLoggerLevel(level); + ((ch.qos.logback.classic.Logger) rootLogger).setLevel(rawLevel); + rootLogger.info("Using {} logger(s) at level={}", clazz.getName(), rawLevel); + } + } + + public static ch.qos.logback.classic.Level getRawLoggerLevel(org.slf4j.event.Level level) { + if (org.slf4j.event.Level.ERROR.equals(level)) { + return ch.qos.logback.classic.Level.ERROR; + } else if (org.slf4j.event.Level.WARN.equals(level)) { + return ch.qos.logback.classic.Level.WARN; + } else if (org.slf4j.event.Level.INFO.equals(level)) { + return ch.qos.logback.classic.Level.INFO; + } else if (org.slf4j.event.Level.DEBUG.equals(level)) { + return ch.qos.logback.classic.Level.DEBUG; + } else if (org.slf4j.event.Level.TRACE.equals(level)) { + return ch.qos.logback.classic.Level.TRACE; + } else { + return ch.qos.logback.classic.Level.INFO; + } + + } + public final String getCurrentTestName() { return testNameHolder.getMethodName(); } diff --git a/sshd-common/src/test/resources/log4j.properties b/sshd-common/src/test/resources/log4j.properties deleted file mode 100644 index cf1d08a..0000000 --- a/sshd-common/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n -log4j.appender.logfile.file=target/sshd-common-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-common/src/test/resources/logback-test.xml b/sshd-common/src/test/resources/logback-test.xml new file mode 100644 index 0000000..f6e91d8 --- /dev/null +++ b/sshd-common/src/test/resources/logback-test.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!DOCTYPE configuration> +<configuration debug="true"> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n</pattern> + </encoder> + </appender> + + <appender name="FILE" class="ch.qos.logback.core.FileAppender"> + <!-- + TODO see if can use a LoggerStartupListener + as described in https://stackoverflow.com/questions/1975939/read-environment-variables-from-logback-configuration-file + --> + <file>target/sshd-tests.log</file> + <append>true</append> + <!-- set immediateFlush to false for much higher logging throughput --> + <immediateFlush>false</immediateFlush> + <encoder> + <pattern>%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n</pattern> + </encoder> + </appender> + + <!-- root level can be changed via -Dorg.apache.sshd.test.root.log.level=XXX --> + <root level="INFO"> + <appender-ref ref="STDOUT" /> + <appender-ref ref="FILE" /> + </root> +</configuration> \ No newline at end of file diff --git a/sshd-contrib/src/test/resources/log4j.properties b/sshd-contrib/src/test/resources/log4j.properties deleted file mode 100644 index 18ea57c..0000000 --- a/sshd-contrib/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n -log4j.appender.logfile.file=target/sshd-contrib-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java b/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java index 068a2d8..01c2a9b 100644 --- a/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java +++ b/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java @@ -32,7 +32,6 @@ import org.apache.sshd.common.util.GenericUtils; import org.apache.sshd.common.util.net.SshdSocketAddress; import org.apache.sshd.server.SshServer; import org.junit.Assume; -import org.junit.BeforeClass; import org.junit.Rule; import org.junit.rules.TestWatcher; import org.junit.runner.Description; @@ -90,16 +89,6 @@ public abstract class BaseTestSupport extends JUnitTestSupport { super(); } - @BeforeClass - public static void setupRootLoggerLevel() { - String levelName = System.getProperty( - "org.apache.sshd.test.root.log.level", org.apache.log4j.Level.INFO.toString()); - org.apache.log4j.Level level = org.apache.log4j.Level.toLevel( - levelName.toUpperCase(), org.apache.log4j.Level.INFO); - org.apache.log4j.Logger logger = org.apache.log4j.Logger.getRootLogger(); - logger.setLevel(level); - } - protected SshServer setupTestServer() { return CoreTestSupportUtils.setupTestServer(getClass()); } diff --git a/sshd-core/src/test/resources/log4j.properties b/sshd-core/src/test/resources/log4j.properties deleted file mode 100644 index 4e4dd65..0000000 --- a/sshd-core/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n -log4j.appender.logfile.file=target/sshd-core-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-git/src/test/resources/log4j.properties b/sshd-git/src/test/resources/log4j.properties deleted file mode 100644 index 87b7908..0000000 --- a/sshd-git/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n -log4j.appender.logfile.file=target/sshd-git-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-ldap/src/test/resources/log4j.properties b/sshd-ldap/src/test/resources/log4j.properties deleted file mode 100644 index 590c257..0000000 --- a/sshd-ldap/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n -log4j.appender.logfile.file=target/sshd-ldap-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-mina/src/test/resources/.gitignore b/sshd-mina/src/test/resources/.gitignore new file mode 100644 index 0000000..99e3531 --- /dev/null +++ b/sshd-mina/src/test/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder \ No newline at end of file diff --git a/sshd-netty/src/test/resources/.gitignore b/sshd-netty/src/test/resources/.gitignore new file mode 100644 index 0000000..99e3531 --- /dev/null +++ b/sshd-netty/src/test/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder \ No newline at end of file diff --git a/sshd-openpgp/src/test/resources/log4j.properties b/sshd-openpgp/src/test/resources/log4j.properties deleted file mode 100644 index e3f24df..0000000 --- a/sshd-openpgp/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n -log4j.appender.logfile.file=target/sshd-pgp-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-putty/src/test/resources/log4j.properties b/sshd-putty/src/test/resources/log4j.properties deleted file mode 100644 index 351467b..0000000 --- a/sshd-putty/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n -log4j.appender.logfile.file=target/sshd-putty-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-scp/src/main/resources/.gitignore b/sshd-scp/src/main/resources/.gitignore new file mode 100644 index 0000000..99e3531 --- /dev/null +++ b/sshd-scp/src/main/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder \ No newline at end of file diff --git a/sshd-scp/src/test/resources/.gitignore b/sshd-scp/src/test/resources/.gitignore new file mode 100644 index 0000000..99e3531 --- /dev/null +++ b/sshd-scp/src/test/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder \ No newline at end of file diff --git a/sshd-scp/src/test/resources/log4j.properties b/sshd-scp/src/test/resources/log4j.properties deleted file mode 100644 index 0159bbd..0000000 --- a/sshd-scp/src/test/resources/log4j.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n -log4j.appender.logfile.file=target/sshd-scp-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-sftp/src/test/resources/.gitignore b/sshd-sftp/src/test/resources/.gitignore new file mode 100644 index 0000000..31e6820 --- /dev/null +++ b/sshd-sftp/src/test/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder diff --git a/sshd-sftp/src/test/resources/log4j.properties b/sshd-sftp/src/test/resources/log4j.properties deleted file mode 100644 index 6643321..0000000 --- a/sshd-sftp/src/test/resources/log4j.properties +++ /dev/null @@ -1,39 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# -# The logging properties used during tests.. -# -log4j.rootLogger=INFO, stdout, logfile -log4j.logger.io.netty.handler.logging=ERROR -#log4j.logger.org.apache.sshd=TRACE -#log4j.logger.org.apache.sshd.common.channel.Window=DEBUG - -# CONSOLE appender -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n - -# File appender -log4j.appender.logfile=org.apache.log4j.FileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d | %-5.5p | %-16.16t | %-32.32c{1} | %-64.64C %4L | %m%n -log4j.appender.logfile.file=target/sshd-sftp-tests.log -log4j.appender.logfile.append=true diff --git a/sshd-spring-sftp/src/main/resources/.gitignore b/sshd-spring-sftp/src/main/resources/.gitignore new file mode 100644 index 0000000..99e3531 --- /dev/null +++ b/sshd-spring-sftp/src/main/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder \ No newline at end of file diff --git a/sshd-spring-sftp/src/test/resources/.gitignore b/sshd-spring-sftp/src/test/resources/.gitignore new file mode 100644 index 0000000..99e3531 --- /dev/null +++ b/sshd-spring-sftp/src/test/resources/.gitignore @@ -0,0 +1 @@ +# Placeholder for empty folder \ No newline at end of file