I know logging can easily become a "religious debat" but I think everyone will agree using "System.out.println" isn't the best solution either ;)

You (the pig team) could vote for it, you are the one who will use it in the end:
1- java logging
2- commons logging (+log4j)
3- sl4j

If you pick the wrong solution, making a search/replace won't be "that" difficult anyway.



My personnal opinion (but I don't include myself in the vote) is for commons logging
- easy to use
- I've been happy with it on previous project (except classloader problems to find conf files but that's not related to the logging system)
- it's already use in hadoop
You can see "Commons Logging FUD" [3] for more details.

I didn't pick java logging just because I don't know anyone who is using it that doesn't give me confidence in it.... I didn't pick slf4j because the api seems over-engeneered [1], I don't like the "{}" in the example [2] (printf style is ok, it's just a matter of taste here), it's less use, apparently the "swapping impl jar" thing is on the commons logging 2.0 roadmap... but I never used it.

But you can safely ignore those arguments. As long as you pick something I'll be happy :D


[1] http://www.slf4j.org/api/org/slf4j/Logger.html
[2] http://www.slf4j.org/manual.html
[3] http://wiki.apache.org/commons/Commons_Logging_FUD

Torsten Curdt a écrit :

On 28.01.2008, at 18:56, Eric Baldeschwieler wrote:

Why not java native logging. It has come a long way.

Has it arrived? Seriously - I only hear bad things about it. But never used it myself.

We keep working around the limitations of commons logging in Hadoop. We break abstraction and use log4j commands to change logging levels at run-time and such.

Well, if configuration is required then is does not make much sense to keep an abstraction ...unless you abstract the configuration away and provide different implementations.

Commons logging also imports assumptions about configuration, right? IE a separate XML file?

CL only makes the assumption that the underlying log library has been configured. The XML file you are referring to is (mainly) to configure what Log implementation to use.

cheers
--
Torsten

Reply via email to