Hi,

I'd like to commit @Inject injection of Loggers at the same time as I do the 
switch to SLF4J/Logback (I have it mostly done on my machine). 

The idea is to move from:

public MyComponent implements LogEnabled, MyComponentRole
{
...
}

to:

public MyComponent implements MyComponentRole
{
  @Inject
  private Logger logger;
...
}

Rationale:
* More consistent with how we inject dependencies
* Makes it easier to move to another DI framework later on (CDI, Guice, etc) 
since the way to implement this with them is to use the JSR299 @Producer 
annotation on a class that produces Loggers.
* Allows to keep the current logging behavior unchanged for backward 
compatibility (we juste deprecate it).

WDYT?

Thanks
-Vincent

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to