You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2012/03/19 13:41:24 UTC

logger injection

Hi,

injecting logger through cdi seems a common need.

i created https://issues.apache.org/jira/browse/DELTASPIKE-122 for this
topic.

IMHO injection of non static fields is not an issue since logging framework
generally cache loggers.

The gain is to avoid boilerplate code regarding the logger category (by
default).

This issue raises 2 questions:
1) what do you think of this feature and should DS support it?
2) if yes should it support multiple implementations? (a nice way could be
to subclass JUL lik ein cxf to provide specific logger for each
implementation type)

- Romain

Re: logger injection

Posted by Jason Porter <li...@gmail.com>.
I'm kind of at a +0 for this one.

On Mon, Mar 19, 2012 at 06:41, Romain Manni-Bucau <rm...@gmail.com>wrote:

> Hi,
>
> injecting logger through cdi seems a common need.
>
> i created https://issues.apache.org/jira/browse/DELTASPIKE-122 for this
> topic.
>
> IMHO injection of non static fields is not an issue since logging framework
> generally cache loggers.
>
> The gain is to avoid boilerplate code regarding the logger category (by
> default).
>
> This issue raises 2 questions:
> 1) what do you think of this feature and should DS support it?
> 2) if yes should it support multiple implementations? (a nice way could be
> to subclass JUL lik ein cxf to provide specific logger for each
> implementation type)
>

Interesting approach, but I don't think JUL has enough features to subclass
well, maybe just pull in SL4J? I know this will really kick off when we
start the full blown logging discussion.


> - Romain
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu