You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Ceki Gülcü <ce...@qos.ch> on 2011/09/07 19:59:14 UTC

log4j v2 binding?

Hello Ralph,

Could you please explain how bindings are done in log4j v2? I see that 
there are multiple artifacts produced such as log4j2-core.jar, 
log4j2-api.jar, log4j12-api.jar, log4j2-jcl.jar and slf4j-impl.jar. Are 
these supposed to be present on the class path simultaneously or at most 
one at a time?

For example, assume I wish to use the slf4j API with log4jv2 as the 
backend. What do I do?

Many thanks in advance,
-- 
QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, 
is looking to hire talented software developers. For further details, 
see http://logback.qos.ch/job.html

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: log4j v2 binding?

Posted by Ceki Gülcü <ce...@qos.ch>.
Got it. It's LogManager in org.apache.logging.log4j. BTW, sorry to reply 
to my own messages.

I guess the idea is to forward calls to log4j to log4jv2 using 
log4j12-api.jar. For JCL, log4j2-jcl.jar contains an Log implementation 
plus LogFactory. For SLF4J, slf4j-impl.jar contains a binding. It all 
makes sense.

On 07/09/2011 8:32 PM, Ceki Gülcü wrote:
> A pointer to the class responsible for "binding" would be sufficient to
> get me going.
>
> On 07/09/2011 7:59 PM, Ceki Gülcü wrote:
>> Hello Ralph,
>>
>> Could you please explain how bindings are done in log4j v2? I see that
>> there are multiple artifacts produced such as log4j2-core.jar,
>> log4j2-api.jar, log4j12-api.jar, log4j2-jcl.jar and slf4j-impl.jar. Are
>> these supposed to be present on the class path simultaneously or at most
>> one at a time?
>>
>> For example, assume I wish to use the slf4j API with log4jv2 as the
>> backend. What do I do?
>>
>> Many thanks in advance,

-- 
QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, 
is looking to hire talented software developers. For further details, 
see http://logback.qos.ch/job.html

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: log4j v2 binding?

Posted by "ralph.goers @dslextreme.com" <ra...@dslextreme.com>.
The main API is log4j2-api. The binding to the implementation happens in
LogManager.

log4j12-api is the support for applications written to Log4j 1.2, slfjj-impl
is the binding to allow applications using SLF4J's API to work with the
Log4j 2.0 implementation, and log4j2-jcl provides the support for
applications written to commons logging. These bindings will all use both
the Log4j 2 api and core components.

On Wed, Sep 7, 2011 at 11:32 AM, Ceki Gülcü <ce...@qos.ch> wrote:

> A pointer to the class responsible for "binding" would be sufficient to get
> me going.
>
>
> On 07/09/2011 7:59 PM, Ceki Gülcü wrote:
>
>> Hello Ralph,
>>
>> Could you please explain how bindings are done in log4j v2? I see that
>> there are multiple artifacts produced such as log4j2-core.jar,
>> log4j2-api.jar, log4j12-api.jar, log4j2-jcl.jar and slf4j-impl.jar. Are
>> these supposed to be present on the class path simultaneously or at most
>> one at a time?
>>
>> For example, assume I wish to use the slf4j API with log4jv2 as the
>> backend. What do I do?
>>
>> Many thanks in advance,
>>
>
>
> --
> QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, is
> looking to hire talented software developers. For further details, see
> http://logback.qos.ch/job.html
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.**apache.org<lo...@logging.apache.org>
> For additional commands, e-mail: log4j-dev-help@logging.apache.**org<lo...@logging.apache.org>
>
>

Re: log4j v2 binding?

Posted by Ceki Gülcü <ce...@qos.ch>.
A pointer to the class responsible for "binding" would be sufficient to 
get me going.

On 07/09/2011 7:59 PM, Ceki Gülcü wrote:
> Hello Ralph,
>
> Could you please explain how bindings are done in log4j v2? I see that
> there are multiple artifacts produced such as log4j2-core.jar,
> log4j2-api.jar, log4j12-api.jar, log4j2-jcl.jar and slf4j-impl.jar. Are
> these supposed to be present on the class path simultaneously or at most
> one at a time?
>
> For example, assume I wish to use the slf4j API with log4jv2 as the
> backend. What do I do?
>
> Many thanks in advance,


-- 
QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, 
is looking to hire talented software developers. For further details, 
see http://logback.qos.ch/job.html

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org