logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Using the SLF4J Bridge
Date Wed, 04 Sep 2013 12:14:17 GMT
On Wed, Sep 4, 2013 at 5:31 AM, Francesco Chicchiriccò
<ilgrosso@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ò
>>> <ilgrosso@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<log4j-user-unsubscribe@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.**apache.org<log4j-user-help@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message