I used log4j cos it was much quicker to implement and at the end of the
day it was the same for the customer. Log4j contains .log api which
makes mapping very easy.
logger.log(level,message,throwable);
jboss-logging does not have this API so i'd need to if/else/switch
statements to get what i want or reflection.
Right now I'm battling with some classloading issues and after that I'll
create a JIRA for this.
Jason T. Greene wrote:
Nah that does bytecode manipulation. I am talking about basically
what
you wrote, but funneling it through jboss-logging instead of log4j.
Galder Zamarreno wrote:
> AFAIK, that's what Trustin's log2log does.
>
> Jason T. Greene wrote:
>> What we need is a container adapter that maps Log API x.y.z to JBoss
>> logging.
>>
>> Galder Zamarreno wrote:
>>> I did a similar thing for a customer who wanted to get their JDK
>>> logging redirected where server.log was logging. I solved it by
>>> adding a JDK to Log4j JDK logging handler but it's having some issues.
>>>
>>> If there're any other solutions, no one mentioned when I raised the
>>> flag to support AS.
>>>
>>> Brian Stansberry wrote:
>>>> I don't think it's anything simple. See, for example, what Stan
>>>> Silvert (copied) had to do to deal with the fact that a JSF impl
>>>> used java.util.logging:
>>>>
>>>>
https://svn.jboss.org/repos/jbossas/trunk/tomcat/src/main/org/jboss/web/j...
>>>>
>>>>
>>>> Jason T. Greene wrote:
>>>>> Sounds good. I will look into how AS is mapping that now, in the
>>>>> past you had to enable a special log appender.
>>>>>
>>>>> Manik Surtani wrote:
>>>>>> I'd rather go with JDK logging then. IIRC, jboss-logging can
>>>>>> intercept JDK logging events and log to the preferred engine, and
>>>>>> this means fewer jars and NO DIRECT dependency on a lousy logging
>>>>>> jar!
>>>>>>
>>>>>>
>>>>>> On 18 Aug 2008, at 18:47, Jason T. Greene wrote:
>>>>>>
>>>>>>> The last time this was discussed, the collective answer is
that
>>>>>>> jboss logging is the preferred wrapper framework, since we
>>>>>>> control its destiny, but that the AS would add adapters for
all
>>>>>>> popular frameworks. For example, hibernate's decision
*cough*
>>>>>>> mistake *cough* lead to work on an sl4j adapter.
>>>>>>>
>>>>>>> JDK logging is also acceptable, since it's the standard
one.
>>>>>>>
>>>>>>> Manik Surtani wrote:
>>>>>>>> I think JGroups is the only one. I think we need to sort
out
>>>>>>>> some sort of logging standard for JBoss. Who wants to
bell
>>>>>>>> THAT cat, now? :-)
>>>>>>>> On 18 Aug 2008, at 14:57, Bela Ban wrote:
>>>>>>>>> I agree on the insanity of it all. Good that JGroups
is not
>>>>>>>>> the only dep which requires you to suck in
commons-logging... :-)
>>>>>>>>>
>>>>>>>>> Manik Surtani wrote:
>>>>>>>>>> It *is* commons logging.
>>>>>>>>>>
>>>>>>>>>> On 16 Aug 2008, at 09:12, Bela Ban wrote:
>>>>>>>>>>
>>>>>>>>>>> Actually, which logging library does
JBossCache use today ?
>>>>>>>>>>> I thought it was commons-logging...
>>>>>>>>>>>
>>>>>>>>>>> Jason T. Greene wrote:
>>>>>>>>>>>> Manik Surtani wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> <SNIP />
>>>>>>>>>>
>>>>>>>>>>>>> Hmm, another jar dep. We need
commons logging anyway for
>>>>>>>>>>>>> JGroups.
>>>>>>>>>>>>
>>>>>>>>>>>> Unfortunately I already have to include
JBoss Logging since
>>>>>>>>>>>> AOP uses it.
>>>>>>>>>>
>>>>>>>>>> For chrissake. Why on earth is LOGGING of all
things such a
>>>>>>>>>> challenge? So this means using JBC with
Hibernate will NOW
>>>>>>>>>> need commons logging (JBC, JGroups), jboss
logging (AOP) and
>>>>>>>>>> slf4j (Hibernate), and all the while the JDK
provides logging
>>>>>>>>>> as well?!? This is insane.
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Manik Surtani
>>>>>>>>>> Lead, JBoss Cache
>>>>>>>>>> manik(a)jboss.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Bela Ban
>>>>>>>>> Lead JGroups / Clustering Team
>>>>>>>>> JBoss - a division of Red Hat
>>>>>>>>>
>>>>>>>> --
>>>>>>>> Manik Surtani
>>>>>>>> Lead, JBoss Cache
>>>>>>>> manik(a)jboss.org
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jason T. Greene
>>>>>>> JBoss, a division of Red Hat
>>>>>>
>>>>>> --
>>>>>> Manik Surtani
>>>>>> Lead, JBoss Cache
>>>>>> manik(a)jboss.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>
--
Galder ZamarreƱo
Sr. Software Maintenance Engineer
JBoss, a division of Red Hat