You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Benjamin Francisoud (JIRA)" <ji...@apache.org> on 2008/01/31 19:03:11 UTC

[jira] Updated: (PIG-83) logging abstraction

     [ https://issues.apache.org/jira/browse/PIG-83?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Francisoud updated PIG-83:
-----------------------------------

    Attachment: PIG-83-v01.patch

This patch remove all System.out.println and System.err.println from java files and replace them with commons logging interface.

Except in 2 classes where the system.out are for command line help or usage printing:
* Main#usage()
* GruntParser#printHelp() 

The rule I applied to make this patch:
* System.out.println is transformed to logger.info
* System.err.println is transformed to logger.error

I made some exception when it was obvious that some System.out where actually debug logs. for instance : PigContext#doHod()

While doing this I improved some error loggin to log the full stacktrace (not only the message) (see PIG-80)
In TimestampedTuple, FuncCond, Grunt, GruntParser, PigScriptParser:
Usually it's just transforming from {code:java}System.err.println(e.getMessage()){code} to {code:java}logger.error(e){code}


Can you review my patch please, if you don't like this one I can make an other one with java native logging just vote for it on the mailing list [1]

thanks

[1] http://www.mail-archive.com/pig-dev%40incubator.apache.org/msg00611.html


> logging abstraction
> -------------------
>
>                 Key: PIG-83
>                 URL: https://issues.apache.org/jira/browse/PIG-83
>             Project: Pig
>          Issue Type: Wish
>            Reporter: Stefan Groschupf
>         Attachments: PIG-83-v01.patch
>
>
> Pig is logging quite a lot into System.out or System.err. Using a embedded pig in a production environment requires a logging abstraction like log4j, commons logging, slf4j or something like that. 
> I would be happy to work on a patch if we decide what would be the best choice. Hadoop uses log4j.
> Thanks.
> Stefan

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.