Community
Participate
Working Groups
Created attachment 172059 [details] Patch The current logger stuff is always logging as the logger from the ui.workbench bundle. It should be possible to create a logger configured on a per class or at least per bundle level. The attached patch adds a ILoggerProvider service and a default implementation which creates a logger on a bundle level.
First, a technical wrinkle: context.set("logger.bundlename", FrameworkUtil.getBundle(clazz).getSymbolicName()); //$NON-NLS-1$ return (Logger) ContextInjectionFactory.make(WorkbenchLogger.class, context); This messes up context. Better to create child and add the "logger.bundlename" to the child. Now, that said, why not change WorkbenchLogger methods to take a bundle? Or, better yet, add a method that takes Status as an argument? ----- Let's not get carried away here; let's do only what's going to be needed in 1.0 release. The logging in general needs to be worked on. That did not happen because of the lack of resources, but it certainly needs to be re-done.
(In reply to comment #1) > First, a technical wrinkle: > > context.set("logger.bundlename", > FrameworkUtil.getBundle(clazz).getSymbolicName()); //$NON-NLS-1$ > return (Logger) ContextInjectionFactory.make(WorkbenchLogger.class, > context); > > This messes up context. Better to create child and add the "logger.bundlename" > to the child. > ok. > Now, that said, why not change WorkbenchLogger methods to take a bundle? Or, > better yet, add a method that takes Status as an argument? > well because then you need to reread the configuration (which log-level, ...) everytime and you need to pass on the bundle all the time. When looking at other frameworks like e.g. log4j they do their logger retrieval on a very similar way. > ----- > > Let's not get carried away here; let's do only what's going to be needed in 1.0 > release. The logging in general needs to be worked on. That did not happen > because of the lack of resources, but it certainly needs to be re-done. So are you +1 on the change? I agree that we need to work on it in 4.1 but the current status is that it is unusable so IMHO the patch at least gives people some kind of logging they can use.
Created attachment 172289 [details] patch Implementing Olegs adivice to create a child context
any news? I need a +1 to commit to rc1
We decided that for RC1 we won't be requiring +1s, to save time. We're still changing code at a high rate. Unless this change would break existing code I'd say just release it.
released the change to HEAD