Hi,

You are right, currently the custom properties are static in the ConfigAdmin configuration.

You can always update ConfigAdmin properties programmatically but it will restart the collector (so, not so good).

In the case of the log collector, I would recommend to use MDC: with MDC you can add any property that will be part of the collected event.

Anyway, let me think about a way to generally add dynamic custom properties.

Regards
JB

On 09/29/2016 06:49 PM, 414n wrote:
Greetings,I'm currently testing out Decanter as a monitoring solution for
Karaf and so far so good.What I'd like to do is to append custom properties
to the data sent over from the collectors to the appender, but I didn't find
a reliable way to do it.Looking at the  log collector code
<https://github.com/apache/karaf-decanter/blob/master/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java#L96>
, I saw that if there are component properties defined these get sent too
alongside the "static ones" like timestamp, loggername, message etc.I tried
injecting the custom properties I would like to send programmatically using
the ConfigAdmin service to no avail. Only by setting a static property
inside the feature.xml of my bundles I was able to see it on the appender
side:However, the property I'm trying to send are dynamic in nature and
cannot be put in static configuration files.The way I'm using the
ConfigAdmin service is this:Can anybody please tell me what I'm doing wrong?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Decanter-log-appender-properties-tp4048206.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to