Add support to propagate ONOS log to Kafka with KafkaAppender in log4j2
- new OSGi Bundle to define extra imports for log4j2
- update OSGiWrapper to support fragment-host tag + bugfix
- add kafka-clients to onos-dependencies package
- add example of how to propagate log to Kafka via KafkaAppender
- bugfix to org.ops4j.pax.logging.cfg
Change-Id: I89992936101a48c6452082bf23c7133c20aa0b48
diff --git a/BUILD b/BUILD
index a4f5688..626eeee 100644
--- a/BUILD
+++ b/BUILD
@@ -42,12 +42,15 @@
BRANDING = "//tools/package/branding:onos-tools-package-branding"
+LOG4J_EXTRA = "//tools/package/log4j2-extra:onos-log4j2-extra"
+
# Generates auxiliary karaf.zip file; branded and augmented with ONOS runtime tools
genrule(
name = "onos-karaf",
srcs = [
KARAF,
BRANDING,
+ LOG4J_EXTRA,
] + glob([
"tools/package/bin/*",
"tools/package/etc/*",
@@ -55,8 +58,8 @@
"tools/package/runtime/bin/*",
]),
outs = ["karaf.zip"],
- cmd = "$(location tools/package/onos-prep-karaf) $(location karaf.zip) $(location %s) %s $(location %s) '' tools/package" %
- (KARAF, ONOS_VERSION, BRANDING),
+ cmd = "$(location tools/package/onos-prep-karaf) $(location karaf.zip) $(location %s) %s $(location %s) '' $(location %s) tools/package" %
+ (KARAF, ONOS_VERSION, BRANDING, LOG4J_EXTRA),
tools = ["tools/package/onos-prep-karaf"],
)