You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Rohini Palaniswamy (JIRA)" <ji...@apache.org> on 2012/09/12 08:05:07 UTC

[jira] [Commented] (PIG-2916) Add script file name for logging with log4j MDC

    [ https://issues.apache.org/jira/browse/PIG-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453752#comment-13453752 ] 

Rohini Palaniswamy commented on PIG-2916:
-----------------------------------------

MDC requires log4j configuration being configured with the exact key and if there are too many it becomes difficult to maintain. If NDC was used, it would be more easy to add more context information without having to go re-configure the log4j configuration every time.  Also it would be better to log "file" instead of localFileRet.file.getName(). If the script was actually in s3 or hdfs, logging "file" would give the full url of the original file.
                
> Add script file name for logging with log4j MDC
> -----------------------------------------------
>
>                 Key: PIG-2916
>                 URL: https://issues.apache.org/jira/browse/PIG-2916
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.11
>            Reporter: Haitao Yao
>         Attachments: mdc.patch
>
>
> We often execute several scripts in parallel and log the messages into one log file.
> If got error , we can not identify which pig script is causing it. So add a MDC with name "pig_script_file_name" and add %X{pig_script_file_name} into log4j configurations, we will surely identify the errorous pig script.
> the patch is attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira