Hi, When implementing a WeavingHook, is there a safe way to perform logging?
I'm asking because my current strategy recently broke when adding the AERI error reporter to the mix: I'm acquiring a log basically from Platform.getLog(bundleContext.getBundle()) (with extra caution to see if the platform is ready). This works well until others register log listeners of their own. Such breakage is tracked in https://bugs.eclipse.org/493566 showing a stack trace of what looks like deadly re-entrance, causing NoClassDefFoundError. I know that the Equinox framework uses a logger of its own, which - I assume - does not support any log listeners, right? Is it possible for a weaving hook implementation to log into the framework log? If no safe log is available, are there any points in the hook protocol, where it is safe to log using a platform log? I'm thinking of queueing log events until modified(WovenClass), but even during that method I don't know if any class loading is active further down the stack that may cause the same problem. Do I have to maintain my own thread-local stack of classes being defined to wait for a point when this stack is empty? Or is it possible to get this information from the framework? Interesting, how such a basic functionality like logging can blow up a system, if both class loading and logging are extensible ... thanks, Stephan _______________________________________________ equinox-dev mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/equinox-dev
