Hi All, Please find the inline comments,
On Mon, Dec 16, 2013 at 12:02 PM, Sameera Jayasoma <[email protected]> wrote: > We've implemented the logging functionality in C5 is using Pax logging. > Logging is enabled when the Pax logging bundle is activated. > > But I faced two major issues with Pax logging that we need to fix > immediately. > > 1) Carbon launcher component logs info and debug levels before launching > the OSGi framework. These log messages never make their way to the > wso2carbon.log file. Because the Pax bundle only enables the logging > services once the Pax bundle is activated by the OSGi framework. Therefore > OSGi framework has to be up and running to get the logging functionality > working, otherwise we loose all log messages logged before the OSGi > framework starts. [1] > By implementing custom ConsoleHandler and a StreamHandler we managed to resolve this issue. Now logs on Carbon launcher prior to the framework startup will be published to wso2carbon.log file. I tested this on both Linux and Windows platforms since two Loggers are watching on the log file whether this occur problems on DailyRollingFileAppender. > > 2) OSGi bundles face a similar problem. it is related to the bundle > starting order. There are two sub issues here. (i) If a bundle becomes > active and start logging before the Pax bundle becomes active, then we > again loose those log messages. (ii) OSGi frameworks stops each and every > bundle before deactivating itself. If the Pax bundle is stopped, then > logging service becomes unavailable. Say a bundle wants to log during the > server stop and if the Pax bundle is stopped before this bundle, we loose > all the logs messages. [2] > > If we are going ahead with Pax, then we need to solve these problems ASAP. > > I asked about this on their mailing list and found a solution. What they recommended was to adjust the start order of the pax bundle before our core bundles so the logging service will be available on core bundles during the operation. Since bundles are shut down in reverse order since pax bundle has lower order it will stop after core bundles are stopped. Now I think we can move forward with pax logging :) Thanks, Manoj
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
