|Custom appender for log4j [message #1793261]
||Thu, 02 August 2018 10:48
| Vito Scornavacche
Registered: February 2018
I have a bundle OSGI containing a custom appender for log4j that send the messages with MQTT. I tried this appender with the emulator and i added a Fragment-Host: log4j in the Manifest of the bundle, which force the emulator to load the bundle before the loading of log4j. On this way the OSGI framework knows that the bundle of the custom appender is mandatory for the loading of the logger.
It works. Changing the Threshold of the custom appender to ERROR, all the errors of kura process are sended to the broker MQTT.
The problem is that when i try to put the dp of the bundle in a linux device doesn't works. Kura load the log4j before the bundle and can not find the class of the custom appender, because it is not loaded yet.
There is a way to set the priority of the OSGI bundles loading?
Powered by FUDForum
. Page generated in 0.01644 seconds