myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: slf4j and myfaces
Date Fri, 05 Jun 2009 18:52:13 GMT
ok - i thought you mean something different...

i didn't thought that you mean something like:
>I know, we end up having a slf4j within myfaces

do you mean to have a wrapper e.g. as commons-module [1]?
-> every myfaces project has a dependency to it?

regards,
gerhard

[1] http://svn.apache.org/repos/asf/myfaces/commons/trunk/

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2009/6/5 Mario Ivankovits <mario@ops.co.at>

>  Why?
>
>
>
> I think our wrapper can do pretty much the same than slf4j does. Having a
>
> public static Log log = LogFactory.getLog(MyClass.class)
>
> can easily be supported by our logging framework.
>
>
>
> Then, any known logging framework has the most possible information
> available, whatever it does with it.
>
>
>
> If a logging framework use a static position of the stack trace, to gather
> its information, is bound to fail anyway and has to be considered a bad
> implementation, no?
>
>
>
> AFAIK, in terms of cl class loader issues, having a static log ist not bad
> if the logging facade has been loaded with the same class-loader than the
> library were loaded. Which should always be the case with our own wrapper.
>
>
>
> Yes, I know, we end up having a slf4j within myfaces. But I see no point
> having a dependency to such a simple API - which exactly adds no value, but
> forces every cl user to setup the sfl4j-over-cl bridge.
>
>
>
> IMHO, the java way to do it is to provide our own simple logging wrapper,
> by using jul as default impl. I know that jul sucks, but this then can
> easily be customized by the developer.
>
>
>
> Mojarra also uses jul, no? So good or bad, this i something we have to deal
> with anyway - providing a pluggable logging api is fair enough then. I
> think, most of the time the user will not care and just start using jul.
>
>
>
> Too bad that SUN did not manage to provide a logging api which has been
> widely accepted :-(
>
>
>
> Ciao,
>
> Mario
>
>
>
> *Von:* Gerhard Petracek [mailto:gerhard.petracek@gmail.com]
> *Gesendet:* Freitag, 05. Juni 2009 20:22
> *An:* MyFaces Development
> *Betreff:* Re: slf4j and myfaces
>
>
>
> @mario:
> which logging frameworks would be supported by such a wrapper. i can just
> mention that there are logging frameworks out there which internally force
> an exception and statically use entry x of the call hierarchy - so such a
> wrapper would lead to wrong logging information.
>
> regards,
> gerhard
>
> (after reformulating the previous mail quite quickly the text wasn't
> perfect - but i think you know what i mean...)
>
>
>  2009/6/5 Gerhard Petracek <gerhard.petracek@gmail.com>
>
> @matthias:
>
>
> yes - that's the reason for my comment: "...external logging framework..."
>
> @udo:
> imo we should discuss the logging topic before we have a release which
> already uses slf4j - especially the suggestion of mario sounds interesting.
>
>
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>   2009/6/5 Mario Ivankovits <mario@ops.co.at>
>
>
>
> Hi!
>
>
>
> Could one please eloberate a little bit more in detail what the pros are of
> slf4j?
>
>
>
> Notice, I switched to it in our company project - but always using the
> commons-logging api and just used the slf4j-over-cl wrapper. This is
> something wich is possible for each and ever user of myfaces already, just
> by adjusting the depencendcies correctly.
>
>
>
> Lately I even switched to my own logging wrapper, but this is another
> story. In the end, everything still uses the cl API which is proven to work
> fine. (I created the org.apache.commons.logging package structure with my
> own classes - which for sure is not possible for myfaces!).
>
>
>
>
>
> I still think, that using the cl api is the best we can do for our users.
> If they then use cl as implementation - and if this is considered "good" -
> is another story, but nothing WE should anticipate.
>
> As far as I can say the cl api is rock solid, just the class-loader stuff
> is a pain. But (again AFAIK), slf4j does not solve it, it just does not deal
> with it.
>
>
>
> Before we start using any other logging api I'd suggest to build our own
> thin myfaces-logging wrapper where one then can easily plug in log4j, cl,
> jul (java utils ogging) or whatever - we do not even have to provide any
> other impl than for jul.
>
> As a plus, this then will remove a dependency - a dependency to any logging
> framework - which - in terms of dependencies can be considered as a "good"
> thing, no?
>
>
>
> Ciao,
>
> Mario
>
>
>
> *Von:* Gerhard Petracek [mailto:gerhard.petracek@gmail.com]
> *Gesendet:* Freitag, 05. Juni 2009 17:18
> *An:* MyFaces Development
> *Betreff:* slf4j and myfaces
>
>
>
> hello all,
>
> again the logging-framework topic :)
> there were several discussions about it and i'm not aware of an agreement.
>
> udo wrote [1]:
> >replace commons-logging with slf4j
>
> as i know we "agreed" on using one logging framework dependency for all
> myfaces projects.
> if i remember correctly, most of us prefer slf4j.
>
> -> i suggest to vote about using slf4j in all myfaces projects.
> (at least if a project is using an external logging framework.)
>
> regards,
> gerhard
>
> [1] http://www.nabble.com/Re%3A-Trinidad-vs-Tobago-p23884581.html
>
>
>
>
>

Mime
View raw message