Reinstate the AbstractConfigTestBase.logConfiguration method 84/69184/2
authorTom Pantelis <tompantelis@gmail.com>
Wed, 7 Mar 2018 04:03:52 +0000 (23:03 -0500)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 7 Mar 2018 04:08:52 +0000 (23:08 -0500)
https://git.opendaylight.org/gerrit/#/c/68992/ removed this method
but there are downstream users so to avoid API breakage the method
was added back but as deprecated.

Change-Id: I8e8eb452724451792c9ac6a140047d063b5d2441
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/config/config-it-base/src/main/java/org/opendaylight/controller/config/it/base/AbstractConfigTestBase.java

index 549aef7..ee2cf1d 100644 (file)
@@ -129,6 +129,18 @@ public abstract class AbstractConfigTestBase {
         return null;
     }
 
+    /**
+     * Returns a Log4J logging configuration property name for the given class's package name of the form
+     * "log4j.logger.package_name".
+     *
+     * @deprecated The karaf logging provider is now Log4J2 so logging configurations must conform to the Log4J2 style.
+     *     This method is kept for compilation backwards compatibility but will be removed in a future release.
+     */
+    @Deprecated
+    public String logConfiguration(final Class<?> klazz) {
+        return "log4j.logger." + klazz.getPackage().getName();
+    }
+
     public String getKarafDistro() {
         String groupId = System.getProperty(KARAF_DISTRO_GROUPID_PROP, KARAF_DISTRO_GROUPID);
         String artifactId = System.getProperty(KARAF_DISTRO_ARTIFACTID_PROP, KARAF_DISTRO_ARTIFACTID);

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.