On Mon, Feb 27, 2017 at 1:56 PM, Carsten Ziegeler <[email protected]> wrote: > Karl Pauls wrote >>>> Yeah, something like this sounds like the way to go. I was wondering >>>> if it isn't a possibility to overload the init() method on the system >>>> bundle to optionally accept a logging object of some kind... >>>> >>> I think that's already too late. You want to have logging starting with >>> the FrameworkFactory which creates the framework/system bundle. >>> And I think this should not be part of the normal o.o.framework package, >>> but rather just be part of o.o.framework.launch >> >> The init method is defined in the Framework interface which is in >> o.o.framework.launch. > > Sure, but as you where saying system "bundle"... :)
The system bundle is the Framework :-D >> Regarding the too late - its possible but in the case of Felix we do >> almost nothing before init isn't called (and iirc, the framework >> interface doesn't allow much either before that) but ymmv :-) >> > Now, I guess an implementation can do whatever it wants within > FrameworkFactory until it returns a Framework object and in general I > guess you want logging there. I agree, thats why I said ymmv - I don't know what other frameworks are doing out there. Granted, what we currently do in Felix is more like what you are suggesting - we allow the factory properties to be a Map<String, Object> and we look for a logger property inside the Felix constructor. If we can get a logger object we use it (via reflection) - otherwise, we create our own system.out logger. I guess we are in violent agreement here - it would be optimal if this could be solved by the spec. regards, Karl > Carsten > > > > -- > Carsten Ziegeler > Adobe Research Switzerland > [email protected] -- Karl Pauls [email protected]
