You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2013/09/02 10:39:41 UTC

Using the SLF4J Bridge

Hi all,
at Syncope we are currently migrating from Logback to Log4j 2.0, as per 
SYNCOPE-405 [1].

Our codebase is almost completely based on SLF4J API, so we are 
evaluating the SLF4J bridge [2] (e.g. log4j-slf4j-impl): this works 
almost fine, except for some classes (like as [3]) where we need to 
programmatically set some logger levels.

I was able to do this with lo4j only by including log4j-core; 
unfortunately it seems that including both log4j-slf4j-impl and 
log4j-core generates some kind of block.

Am I doing something wrong?

We are using the last stable release (2.0-beta8).

Regards.

[1] https://issues.apache.org/jira/browse/SYNCOPE-405
[2] http://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html
[3] 
https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/LoggerLoader.java

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Re: Using the SLF4J Bridge

Posted by Gary Gregory <ga...@gmail.com>.
The only Log4j related code I see is logging a throwable it seems. I would
try, a combination of:

- Make sure to use the latest version of Surefire
- Try the current version of Log4J by building it from trunk and installing
it in your local Maven repo.
- Change your logging pattern to NOT log throwables.

It's a bit like going fishing...

Gary


On Wed, Sep 4, 2013 at 8:19 AM, Francesco Chicchiriccò
<il...@apache.org>wrote:

> On 04/09/2013 14:14, Gary Gregory wrote:
>
>> [...]
>>
>>> Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
>>> With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test
>>> execution hangs:
>>>
>>> java version "1.7.0_25"
>>> OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
>>> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>>>
>>> Using vanilla or "colorized" Maven 3.1.0 does not make any difference.
>>>
>>> Any clue?
>>>
>> On Windows/Oracle, you can hit Ctrl-Break on the command line and get a
>> JVM
>> dump of what all threads are doing. I would try that when the JVM appears
>> hung.
>>
>
> On Linux it's CTRL+ATL+\ - here you go: http://apaste.info/fPVg
>
> Thanks for your support.
> Regards.
>
> --
> Francesco Chicchiriccò
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~**ilgrosso/<http://people.apache.org/~ilgrosso/>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Using the SLF4J Bridge

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Sep 4, 2013 at 9:16 AM, Francesco Chicchiriccò
<il...@apache.org>wrote:

> On 04/09/2013 14:37, Ralph Goers wrote:
>
>> Also, I think Nick made changes to how we are calling getCallerClass in
>> trunk, so if you want to use that version of OpenJDK you might need to use
>> the latest code.
>>
>
> I have downloaded JDK7u40 Early Access from https://jdk7.java.net/**
> download.html <https://jdk7.java.net/download.html> and set log4j
> artifacts version to 2.0-beta9-SNAPSHOT: no hung occurred.
>
> Afterwards, I've switched back to OpenJDK7u25 (still with log4j
> 2.0-beta9-SNAPSHOT) and everything worked as well; finally successfully
> tested even with Oracle JDK 7.
>
> Guess I've solved our problem on Syncope for the moment: we'll stay on
> 2.0-beta9-SNAPSHOT which is expected to be released way before our next
> major release (featuring log4j).


Good news! Ralph mentioned he was going to push beta9 ASAP (within a week I
am guessing). Stay tuned.

Gary


>
>
> Thanks for your support.
> Regards.
>
>  On Sep 4, 2013, at 6:35 AM, Ralph Goers <rg...@apache.org> wrote:
>>
>>  I see a thread in getCallerClass.  I don't recall what the status of
>>> 7u25 is (Nick would probably know), but OpenJDK has been going back and
>>> forth on that method.  I think there might be a newer OpenJDK release (40?)
>>> that fixes the problem.
>>>
>>> Sent from my iPad
>>>
>>> On Sep 4, 2013, at 6:19 AM, Francesco Chicchiriccò <il...@apache.org>
>>> wrote:
>>>
>>>  On 04/09/2013 14:14, Gary Gregory wrote:
>>>>
>>>>> [...]
>>>>>
>>>>>> Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
>>>>>> With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test
>>>>>> execution hangs:
>>>>>>
>>>>>> java version "1.7.0_25"
>>>>>> OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
>>>>>> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>>>>>>
>>>>>> Using vanilla or "colorized" Maven 3.1.0 does not make any difference.
>>>>>>
>>>>>> Any clue?
>>>>>>
>>>>> On Windows/Oracle, you can hit Ctrl-Break on the command line and get
>>>>> a JVM
>>>>> dump of what all threads are doing. I would try that when the JVM
>>>>> appears
>>>>> hung.
>>>>>
>>>> On Linux it's CTRL+ATL+\ - here you go: http://apaste.info/fPVg
>>>>
>>>> Thanks for your support.
>>>> Regards.
>>>>
>>>
> --
> Francesco Chicchiriccò
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~**ilgrosso/<http://people.apache.org/~ilgrosso/>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Using the SLF4J Bridge

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 04/09/2013 14:37, Ralph Goers wrote:
> Also, I think Nick made changes to how we are calling getCallerClass in trunk, so if you want to use that version of OpenJDK you might need to use the latest code.

I have downloaded JDK7u40 Early Access from 
https://jdk7.java.net/download.html and set log4j artifacts version to 
2.0-beta9-SNAPSHOT: no hung occurred.

Afterwards, I've switched back to OpenJDK7u25 (still with log4j 
2.0-beta9-SNAPSHOT) and everything worked as well; finally successfully 
tested even with Oracle JDK 7.

Guess I've solved our problem on Syncope for the moment: we'll stay on 
2.0-beta9-SNAPSHOT which is expected to be released way before our next 
major release (featuring log4j).

Thanks for your support.
Regards.

> On Sep 4, 2013, at 6:35 AM, Ralph Goers <rg...@apache.org> wrote:
>
>> I see a thread in getCallerClass.  I don't recall what the status of 7u25 is (Nick would probably know), but OpenJDK has been going back and forth on that method.  I think there might be a newer OpenJDK release (40?) that fixes the problem.
>>
>> Sent from my iPad
>>
>> On Sep 4, 2013, at 6:19 AM, Francesco Chicchiriccò <il...@apache.org> wrote:
>>
>>> On 04/09/2013 14:14, Gary Gregory wrote:
>>>> [...]
>>>>> Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
>>>>> With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test
>>>>> execution hangs:
>>>>>
>>>>> java version "1.7.0_25"
>>>>> OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
>>>>> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>>>>>
>>>>> Using vanilla or "colorized" Maven 3.1.0 does not make any difference.
>>>>>
>>>>> Any clue?
>>>> On Windows/Oracle, you can hit Ctrl-Break on the command line and get a JVM
>>>> dump of what all threads are doing. I would try that when the JVM appears
>>>> hung.
>>> On Linux it's CTRL+ATL+\ - here you go: http://apaste.info/fPVg
>>>
>>> Thanks for your support.
>>> Regards.

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Re: Using the SLF4J Bridge

Posted by Ralph Goers <rg...@apache.org>.
Also, I think Nick made changes to how we are calling getCallerClass in trunk, so if you want to use that version of OpenJDK you might need to use the latest code.

Sent from my iPad

On Sep 4, 2013, at 6:35 AM, Ralph Goers <rg...@apache.org> wrote:

> I see a thread in getCallerClass.  I don't recall what the status of 7u25 is (Nick would probably know), but OpenJDK has been going back and forth on that method.  I think there might be a newer OpenJDK release (40?) that fixes the problem.
> 
> Sent from my iPad
> 
> On Sep 4, 2013, at 6:19 AM, Francesco Chicchiriccò <il...@apache.org> wrote:
> 
>> On 04/09/2013 14:14, Gary Gregory wrote:
>>> [...]
>>>> Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
>>>> With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test
>>>> execution hangs:
>>>> 
>>>> java version "1.7.0_25"
>>>> OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
>>>> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>>>> 
>>>> Using vanilla or "colorized" Maven 3.1.0 does not make any difference.
>>>> 
>>>> Any clue?
>>> On Windows/Oracle, you can hit Ctrl-Break on the command line and get a JVM
>>> dump of what all threads are doing. I would try that when the JVM appears
>>> hung.
>> 
>> On Linux it's CTRL+ATL+\ - here you go: http://apaste.info/fPVg
>> 
>> Thanks for your support.
>> Regards.
>> 
>> -- 
>> Francesco Chicchiriccò
>> 
>> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
>> http://people.apache.org/~ilgrosso/
>> 

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


Re: Using the SLF4J Bridge

Posted by Ralph Goers <rg...@apache.org>.
I see a thread in getCallerClass.  I don't recall what the status of 7u25 is (Nick would probably know), but OpenJDK has been going back and forth on that method.  I think there might be a newer OpenJDK release (40?) that fixes the problem.

Sent from my iPad

On Sep 4, 2013, at 6:19 AM, Francesco Chicchiriccò <il...@apache.org> wrote:

> On 04/09/2013 14:14, Gary Gregory wrote:
>> [...]
>>> Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
>>> With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test
>>> execution hangs:
>>> 
>>> java version "1.7.0_25"
>>> OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
>>> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>>> 
>>> Using vanilla or "colorized" Maven 3.1.0 does not make any difference.
>>> 
>>> Any clue?
>> On Windows/Oracle, you can hit Ctrl-Break on the command line and get a JVM
>> dump of what all threads are doing. I would try that when the JVM appears
>> hung.
> 
> On Linux it's CTRL+ATL+\ - here you go: http://apaste.info/fPVg
> 
> Thanks for your support.
> Regards.
> 
> -- 
> Francesco Chicchiriccò
> 
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~ilgrosso/
> 

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


Re: Using the SLF4J Bridge

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 04/09/2013 14:14, Gary Gregory wrote:
> [...]
>> Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
>> With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test
>> execution hangs:
>>
>> java version "1.7.0_25"
>> OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
>> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>>
>> Using vanilla or "colorized" Maven 3.1.0 does not make any difference.
>>
>> Any clue?
> On Windows/Oracle, you can hit Ctrl-Break on the command line and get a JVM
> dump of what all threads are doing. I would try that when the JVM appears
> hung.

On Linux it's CTRL+ATL+\ - here you go: http://apaste.info/fPVg

Thanks for your support.
Regards.

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


Re: Using the SLF4J Bridge

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Sep 4, 2013 at 5:31 AM, Francesco Chicchiriccò
<il...@apache.org>wrote:

> On 04/09/2013 09:10, Francesco Chicchiriccò wrote:
>
>> On 03/09/2013 22:19, Gary Gregory wrote:
>>
>>> The tests works for me:
>>>
>>> [...]
>>> My set up:
>>>
>>> Apache Maven 3.0.5 (**r01de14724cdef164cd33c7c8c2fe1**55faf9602da;
>>> 2013-02-19
>>> 08:51:28-0500)
>>> Maven home: C:\Java\apache-maven-3.0.5\**bin\..
>>> Java version: 1.7.0_25, vendor: Oracle Corporation
>>> Java home: C:\Program Files\Java\jdk1.7.0_25\jre
>>> Default locale: en_US, platform encoding: Cp1252
>>> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>>>
>>
>> Hi,
>> I confirm it works on Linux as well, either with Maven 3.1.0 and Maven
>> 3.0.5: once seen your configuration, I remembered that I was using a
>> mangled Maven 3.1.0 installation, as per blog post [5] (I actually loved
>> the idea of colorized output).
>>
>> At the moment I've switched back to vanilla Maven 3.1.0 and everything is
>> working fine again.
>>
>
> Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
> With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test
> execution hangs:
>
> java version "1.7.0_25"
> OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
> OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
>
> Using vanilla or "colorized" Maven 3.1.0 does not make any difference.
>
> Any clue?


On Windows/Oracle, you can hit Ctrl-Break on the command line and get a JVM
dump of what all threads are doing. I would try that when the JVM appears
hung.

Gary


>
>
> Regards.
>
>  On Mon, Sep 2, 2013 at 6:47 AM, Francesco Chicchiriccò
>>> <il...@apache.org>wrote:
>>>
>>>  On 02/09/2013 10:39, Francesco Chicchiriccň wrote:
>>>>
>>>>  Hi all,
>>>>> at Syncope we are currently migrating from Logback to Log4j 2.0, as per
>>>>> SYNCOPE-405 [1].
>>>>>
>>>>> Our codebase is almost completely based on SLF4J API, so we are
>>>>> evaluating the SLF4J bridge [2] (e.g. log4j-slf4j-impl): this works
>>>>> almost
>>>>> fine, except for some classes (like as [3]) where we need to
>>>>> programmatically set some logger levels.
>>>>>
>>>>> I was able to do this with lo4j only by including log4j-core;
>>>>> unfortunately it seems that including both log4j-slf4j-impl and
>>>>> log4j-core
>>>>> generates some kind of block.
>>>>>
>>>>> Am I doing something wrong?
>>>>>
>>>>> We are using the last stable release (2.0-beta8).
>>>>>
>>>>>  In order to ease hunting, I have forked the Apache Syncope repository
>>>> and
>>>> created a LOG4J2 branch on my own fork [4] that is using both
>>>> log4j-slf4j-impl and log4j-core: to reproduce, just clone, switch to the
>>>> LOG4J2 branch and:
>>>>
>>>> $ mvn -PskipTests
>>>> $ cd core
>>>> $ mvn clean test
>>>>
>>>> At this point the first unit test (org.apache.syncope.core.****
>>>> connid.PasswordGeneratorTest)
>>>> will hang.
>>>>
>>>>
>>>> Regards.
>>>>
>>>>   [1] https://issues.apache.org/****jira/browse/SYNCOPE-405<https://issues.apache.org/**jira/browse/SYNCOPE-405>
>>>> <https:**//issues.apache.org/jira/**browse/SYNCOPE-405<https://issues.apache.org/jira/browse/SYNCOPE-405>
>>>> >
>>>>
>>>>> [2] http://logging.apache.org/****log4j/2.x/log4j-slf4j-impl/****
>>>>> index.html<http://logging.apache.org/**log4j/2.x/log4j-slf4j-impl/**index.html>
>>>>> <http://logging.**apache.org/log4j/2.x/log4j-**slf4j-impl/index.html<http://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html>
>>>>> >
>>>>> [3] https://svn.apache.org/repos/****asf/syncope/trunk/core/src/**<https://svn.apache.org/repos/**asf/syncope/trunk/core/src/**>
>>>>> main/java/org/apache/syncope/****core/init/LoggerLoader.java<h**
>>>>> ttps://svn.apache.org/repos/**asf/syncope/trunk/core/src/**
>>>>> main/java/org/apache/syncope/**core/init/LoggerLoader.java<https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/LoggerLoader.java>>
>>>>>
>>>>>
>>>>>  [4] https://github.com/ilgrosso/****syncope/tree/LOG4J2<https://github.com/ilgrosso/**syncope/tree/LOG4J2>
>>>> <https://**github.com/ilgrosso/syncope/**tree/LOG4J2<https://github.com/ilgrosso/syncope/tree/LOG4J2>
>>>> >
>>>>
>>> [5] http://aheritier.net/united-**colors-of-maven/<http://aheritier.net/united-colors-of-maven/>
>>
>
> --
> Francesco Chicchiriccò
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~**ilgrosso/<http://people.apache.org/~ilgrosso/>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Using the SLF4J Bridge

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 04/09/2013 09:10, Francesco Chicchiriccò wrote:
> On 03/09/2013 22:19, Gary Gregory wrote:
>> The tests works for me:
>>
>> [...]
>> My set up:
>>
>> Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 
>> 2013-02-19
>> 08:51:28-0500)
>> Maven home: C:\Java\apache-maven-3.0.5\bin\..
>> Java version: 1.7.0_25, vendor: Oracle Corporation
>> Java home: C:\Program Files\Java\jdk1.7.0_25\jre
>> Default locale: en_US, platform encoding: Cp1252
>> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>
> Hi,
> I confirm it works on Linux as well, either with Maven 3.1.0 and Maven 
> 3.0.5: once seen your configuration, I remembered that I was using a 
> mangled Maven 3.1.0 installation, as per blog post [5] (I actually 
> loved the idea of colorized output).
>
> At the moment I've switched back to vanilla Maven 3.1.0 and everything 
> is working fine again.

Update: on Linux, with OpenJDK 6 / Oracle JDK6 everything works fine.
With Oracle JDK 7 everything is fine as well, but with OpenJDK 7 test 
execution hangs:

java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Using vanilla or "colorized" Maven 3.1.0 does not make any difference.

Any clue?

Regards.

>> On Mon, Sep 2, 2013 at 6:47 AM, Francesco Chicchiriccò
>> <il...@apache.org>wrote:
>>
>>> On 02/09/2013 10:39, Francesco Chicchiriccň wrote:
>>>
>>>> Hi all,
>>>> at Syncope we are currently migrating from Logback to Log4j 2.0, as 
>>>> per
>>>> SYNCOPE-405 [1].
>>>>
>>>> Our codebase is almost completely based on SLF4J API, so we are
>>>> evaluating the SLF4J bridge [2] (e.g. log4j-slf4j-impl): this works 
>>>> almost
>>>> fine, except for some classes (like as [3]) where we need to
>>>> programmatically set some logger levels.
>>>>
>>>> I was able to do this with lo4j only by including log4j-core;
>>>> unfortunately it seems that including both log4j-slf4j-impl and 
>>>> log4j-core
>>>> generates some kind of block.
>>>>
>>>> Am I doing something wrong?
>>>>
>>>> We are using the last stable release (2.0-beta8).
>>>>
>>> In order to ease hunting, I have forked the Apache Syncope 
>>> repository and
>>> created a LOG4J2 branch on my own fork [4] that is using both
>>> log4j-slf4j-impl and log4j-core: to reproduce, just clone, switch to 
>>> the
>>> LOG4J2 branch and:
>>>
>>> $ mvn -PskipTests
>>> $ cd core
>>> $ mvn clean test
>>>
>>> At this point the first unit test 
>>> (org.apache.syncope.core.**connid.PasswordGeneratorTest)
>>> will hang.
>>>
>>>
>>> Regards.
>>>
>>>   [1] 
>>> https://issues.apache.org/**jira/browse/SYNCOPE-405<https://issues.apache.org/jira/browse/SYNCOPE-405>
>>>> [2] 
>>>> http://logging.apache.org/**log4j/2.x/log4j-slf4j-impl/**index.html<http://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html>
>>>> [3] https://svn.apache.org/repos/**asf/syncope/trunk/core/src/**
>>>> main/java/org/apache/syncope/**core/init/LoggerLoader.java<https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/LoggerLoader.java> 
>>>>
>>>>
>>> [4] 
>>> https://github.com/ilgrosso/**syncope/tree/LOG4J2<https://github.com/ilgrosso/syncope/tree/LOG4J2>
> [5] http://aheritier.net/united-colors-of-maven/

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Re: Using the SLF4J Bridge

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 03/09/2013 22:19, Gary Gregory wrote:
> The tests works for me:
>
> [...]
> My set up:
>
> Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19
> 08:51:28-0500)
> Maven home: C:\Java\apache-maven-3.0.5\bin\..
> Java version: 1.7.0_25, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.7.0_25\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Hi,
I confirm it works on Linux as well, either with Maven 3.1.0 and Maven 
3.0.5: once seen your configuration, I remembered that I was using a 
mangled Maven 3.1.0 installation, as per blog post [5] (I actually loved 
the idea of colorized output).

At the moment I've switched back to vanilla Maven 3.1.0 and everything 
is working fine again.

Thanks for your support.

Regards.

> On Mon, Sep 2, 2013 at 6:47 AM, Francesco Chicchiriccò
> <il...@apache.org>wrote:
>
>> On 02/09/2013 10:39, Francesco Chicchiriccň wrote:
>>
>>> Hi all,
>>> at Syncope we are currently migrating from Logback to Log4j 2.0, as per
>>> SYNCOPE-405 [1].
>>>
>>> Our codebase is almost completely based on SLF4J API, so we are
>>> evaluating the SLF4J bridge [2] (e.g. log4j-slf4j-impl): this works almost
>>> fine, except for some classes (like as [3]) where we need to
>>> programmatically set some logger levels.
>>>
>>> I was able to do this with lo4j only by including log4j-core;
>>> unfortunately it seems that including both log4j-slf4j-impl and log4j-core
>>> generates some kind of block.
>>>
>>> Am I doing something wrong?
>>>
>>> We are using the last stable release (2.0-beta8).
>>>
>> In order to ease hunting, I have forked the Apache Syncope repository and
>> created a LOG4J2 branch on my own fork [4] that is using both
>> log4j-slf4j-impl and log4j-core: to reproduce, just clone, switch to the
>> LOG4J2 branch and:
>>
>> $ mvn -PskipTests
>> $ cd core
>> $ mvn clean test
>>
>> At this point the first unit test (org.apache.syncope.core.**connid.PasswordGeneratorTest)
>> will hang.
>>
>>
>> Regards.
>>
>>   [1] https://issues.apache.org/**jira/browse/SYNCOPE-405<https://issues.apache.org/jira/browse/SYNCOPE-405>
>>> [2] http://logging.apache.org/**log4j/2.x/log4j-slf4j-impl/**index.html<http://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html>
>>> [3] https://svn.apache.org/repos/**asf/syncope/trunk/core/src/**
>>> main/java/org/apache/syncope/**core/init/LoggerLoader.java<https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/LoggerLoader.java>
>>>
>> [4] https://github.com/ilgrosso/**syncope/tree/LOG4J2<https://github.com/ilgrosso/syncope/tree/LOG4J2>
[5] http://aheritier.net/united-colors-of-maven/

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Re: Using the SLF4J Bridge

Posted by Gary Gregory <ga...@gmail.com>.
The tests works for me:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.syncope.core.connid.PasswordGeneratorTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.865 sec
- in org.apache.syncope.core.connid.PasswordGeneratorTest
Running org.apache.syncope.core.init.ConnectorManagerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.613 sec -
in org.apache.syncope.core.init.ConnectorManagerTest
Running org.apache.syncope.core.notification.NotificationTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.977 sec
- in org.apache.syncope.core.notification.NotificationTest
Running org.apache.syncope.core.persistence.dao.AttrTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.12 sec -
in org.apache.syncope.core.persistence.dao.AttrTest
Running org.apache.syncope.core.persistence.dao.AttributableSearchTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.357 sec
- in org.apache.syncope.core.persistence.dao.AttributableSearchTest
Running org.apache.syncope.core.persistence.dao.ConnInstanceTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.498 sec -
in org.apache.syncope.core.persistence.dao.ConnInstanceTest
Running org.apache.syncope.core.persistence.dao.DerAttrTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.258 sec -
in org.apache.syncope.core.persistence.dao.DerAttrTest
Running org.apache.syncope.core.persistence.dao.DerSchemaTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec -
in org.apache.syncope.core.persistence.dao.DerSchemaTest
Running org.apache.syncope.core.persistence.dao.EntitlementTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.077 sec -
in org.apache.syncope.core.persistence.dao.EntitlementTest
Running org.apache.syncope.core.persistence.dao.MembershipTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.087 sec -
in org.apache.syncope.core.persistence.dao.MembershipTest
Running org.apache.syncope.core.persistence.dao.NotificationTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 sec -
in org.apache.syncope.core.persistence.dao.NotificationTest
Running org.apache.syncope.core.persistence.dao.PolicyTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.091 sec -
in org.apache.syncope.core.persistence.dao.PolicyTest
Running org.apache.syncope.core.persistence.dao.ReportTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.087 sec -
in org.apache.syncope.core.persistence.dao.ReportTest
Running org.apache.syncope.core.persistence.dao.ResourceTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.258 sec
- in org.apache.syncope.core.persistence.dao.ResourceTest
Running org.apache.syncope.core.persistence.dao.RoleTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.33 sec -
in org.apache.syncope.core.persistence.dao.RoleTest
Running org.apache.syncope.core.persistence.dao.SchemaTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.182 sec -
in org.apache.syncope.core.persistence.dao.SchemaTest
Running org.apache.syncope.core.persistence.dao.TaskExecTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.066 sec -
in org.apache.syncope.core.persistence.dao.TaskExecTest
Running org.apache.syncope.core.persistence.dao.TaskTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.119 sec -
in org.apache.syncope.core.persistence.dao.TaskTest
Running org.apache.syncope.core.persistence.dao.UserTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.3 sec -
in org.apache.syncope.core.persistence.dao.UserTest
Running org.apache.syncope.core.persistence.dao.VirAttrTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.persistence.dao.VirAttrTest
Running org.apache.syncope.core.persistence.dao.VirSchemaTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.persistence.dao.VirSchemaTest
Running org.apache.syncope.core.persistence.relationships.AttrTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec -
in org.apache.syncope.core.persistence.relationships.AttrTest
Running
org.apache.syncope.core.persistence.relationships.AttributableSearchTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in
org.apache.syncope.core.persistence.relationships.AttributableSearchTest
Running org.apache.syncope.core.persistence.relationships.ConnInstanceTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec -
in org.apache.syncope.core.persistence.relationships.ConnInstanceTest
Running org.apache.syncope.core.persistence.relationships.DerSchemaTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.persistence.relationships.DerSchemaTest
Running org.apache.syncope.core.persistence.relationships.MembershipTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.persistence.relationships.MembershipTest
Running org.apache.syncope.core.persistence.relationships.ReportTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec -
in org.apache.syncope.core.persistence.relationships.ReportTest
Running org.apache.syncope.core.persistence.relationships.ResourceTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.persistence.relationships.ResourceTest
Running org.apache.syncope.core.persistence.relationships.RoleTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.persistence.relationships.RoleTest
Running org.apache.syncope.core.persistence.relationships.SchemaTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.persistence.relationships.SchemaTest
Running org.apache.syncope.core.persistence.relationships.TaskTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec -
in org.apache.syncope.core.persistence.relationships.TaskTest
Running org.apache.syncope.core.persistence.relationships.UserTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in
org.apache.syncope.core.persistence.relationships.UserTest
Running org.apache.syncope.core.policy.AccountPolicyEnforcerTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.policy.AccountPolicyEnforcerTest
Running org.apache.syncope.core.rest.data.ResourceDataBinderTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
in org.apache.syncope.core.rest.data.ResourceDataBinderTest
Running org.apache.syncope.core.security.PasswordEncoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.176 sec -
in org.apache.syncope.core.security.PasswordEncoderTest
Running org.apache.syncope.core.sync.SyncTaskTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.038 sec -
in org.apache.syncope.core.sync.SyncTaskTest

Results :

Tests run: 176, Failures: 0, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1:16.443s
[INFO] Finished at: Tue Sep 03 16:18:51 EDT 2013
[INFO] Final Memory: 56M/608M
[INFO]
------------------------------------------------------------------------

My set up:

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19
08:51:28-0500)
Maven home: C:\Java\apache-maven-3.0.5\bin\..
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_25\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Gary




On Mon, Sep 2, 2013 at 6:47 AM, Francesco Chicchiriccò
<il...@apache.org>wrote:

> On 02/09/2013 10:39, Francesco Chicchiriccň wrote:
>
>> Hi all,
>> at Syncope we are currently migrating from Logback to Log4j 2.0, as per
>> SYNCOPE-405 [1].
>>
>> Our codebase is almost completely based on SLF4J API, so we are
>> evaluating the SLF4J bridge [2] (e.g. log4j-slf4j-impl): this works almost
>> fine, except for some classes (like as [3]) where we need to
>> programmatically set some logger levels.
>>
>> I was able to do this with lo4j only by including log4j-core;
>> unfortunately it seems that including both log4j-slf4j-impl and log4j-core
>> generates some kind of block.
>>
>> Am I doing something wrong?
>>
>> We are using the last stable release (2.0-beta8).
>>
>
> In order to ease hunting, I have forked the Apache Syncope repository and
> created a LOG4J2 branch on my own fork [4] that is using both
> log4j-slf4j-impl and log4j-core: to reproduce, just clone, switch to the
> LOG4J2 branch and:
>
> $ mvn -PskipTests
> $ cd core
> $ mvn clean test
>
> At this point the first unit test (org.apache.syncope.core.**connid.PasswordGeneratorTest)
> will hang.
>
>
> Regards.
>
>  [1] https://issues.apache.org/**jira/browse/SYNCOPE-405<https://issues.apache.org/jira/browse/SYNCOPE-405>
>> [2] http://logging.apache.org/**log4j/2.x/log4j-slf4j-impl/**index.html<http://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html>
>> [3] https://svn.apache.org/repos/**asf/syncope/trunk/core/src/**
>> main/java/org/apache/syncope/**core/init/LoggerLoader.java<https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/LoggerLoader.java>
>>
> [4] https://github.com/ilgrosso/**syncope/tree/LOG4J2<https://github.com/ilgrosso/syncope/tree/LOG4J2>
>
> --
> Francesco Chicchiriccň
>
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~**ilgrosso/<http://people.apache.org/~ilgrosso/>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Using the SLF4J Bridge

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 02/09/2013 10:39, Francesco Chicchiriccò wrote:
> Hi all,
> at Syncope we are currently migrating from Logback to Log4j 2.0, as 
> per SYNCOPE-405 [1].
>
> Our codebase is almost completely based on SLF4J API, so we are 
> evaluating the SLF4J bridge [2] (e.g. log4j-slf4j-impl): this works 
> almost fine, except for some classes (like as [3]) where we need to 
> programmatically set some logger levels.
>
> I was able to do this with lo4j only by including log4j-core; 
> unfortunately it seems that including both log4j-slf4j-impl and 
> log4j-core generates some kind of block.
>
> Am I doing something wrong?
>
> We are using the last stable release (2.0-beta8).

In order to ease hunting, I have forked the Apache Syncope repository 
and created a LOG4J2 branch on my own fork [4] that is using both 
log4j-slf4j-impl and log4j-core: to reproduce, just clone, switch to the 
LOG4J2 branch and:

$ mvn -PskipTests
$ cd core
$ mvn clean test

At this point the first unit test 
(org.apache.syncope.core.connid.PasswordGeneratorTest) will hang.

Regards.

> [1] https://issues.apache.org/jira/browse/SYNCOPE-405
> [2] http://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html
> [3] 
> https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/LoggerLoader.java
[4] https://github.com/ilgrosso/syncope/tree/LOG4J2

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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