BUG-1051: logback configuration loader proposal 52/7252/3
authorMichal Rehak <mirehak@cisco.com>
Tue, 20 May 2014 15:57:18 +0000 (17:57 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Fri, 30 May 2014 15:13:06 +0000 (15:13 +0000)
commitbca2f0e1c9d47e42b43811097891034528355fc5
tree06405829677589ec8405a078c4cc136451012bbc
parent82eb3f94c133e091ca5dd2f26450da9f121c12ca
BUG-1051: logback configuration loader proposal

- uses environment variable logback.config.d (pointing to config root folder)
- removes previously loaded logging configuration
- applies all config files from config root folder in alphabetical order
- requires:
  - to be added to osgi.bundles (configuration.ini)
  - existing logback.config.d variable (configuration.ini)
  - logback config files in specified config root folder
- added overloads for load method
- enriched util class protection against "accidental" instantiation
- using precompiled pattern while iterating folder content
- added classcast protection for case when the logging backend differs from logback

Change-Id: Id0242c78fe39b9631d1a4bca66d9674f7a3fec62
Signed-off-by: Michal Rehak <mirehak@cisco.com>
15 files changed:
opendaylight/config/logback-config-loader/pom.xml [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/main/java/org/opendaylight/controller/logback/config/loader/Activator.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/main/java/org/opendaylight/controller/logback/config/loader/impl/LogbackConfigUtil.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/main/java/org/opendaylight/controller/logback/config/loader/impl/LogbackConfigurationLoader.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/LogbackConfigurationLoaderTest.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/TestAppender.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/logwork/Debugger.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/logwork/Errorer.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/logwork/Informer.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/logwork/Tracer.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/java/org/opendaylight/controller/logback/config/loader/test/logwork/Warner.java [new file with mode: 0644]
opendaylight/config/logback-config-loader/src/test/resources/logback-test.xml [new file with mode: 0755]
opendaylight/config/logback-config-loader/src/test/resources/logback.d/logback-alt.xml [new file with mode: 0755]
opendaylight/config/logback-config-loader/src/test/resources/logback.d/logback-alt2.xml [new file with mode: 0755]
opendaylight/config/logback-config-loader/src/test/resources/logback.d/logback-alt3.xml [new file with mode: 0755]

©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.