You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Haitao Yao (JIRA)" <ji...@apache.org> on 2012/09/12 04:57:07 UTC
[jira] [Created] (PIG-2916) Add script file name for logging with
log4j MDC
Haitao Yao created PIG-2916:
-------------------------------
Summary: 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
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
[jira] [Commented] (PIG-2916) Add script file name for logging with
log4j MDC
Posted by "Haitao Yao (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454580#comment-13454580 ]
Haitao Yao commented on PIG-2916:
---------------------------------
But i think the MDC is better, because we may log more information into the log. MDC will filter the specific value you want.
> 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
[jira] [Commented] (PIG-2916) Add script file name for logging with
log4j MDC
Posted by "Rohini Palaniswamy (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (PIG-2916) Add script file name for logging with
log4j MDC
Posted by "Haitao Yao (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Haitao Yao updated PIG-2916:
----------------------------
Patch Info: Patch Available
> 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
[jira] [Updated] (PIG-2916) Add script file name for logging with
log4j MDC
Posted by "Haitao Yao (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Haitao Yao updated PIG-2916:
----------------------------
Attachment: mdc.patch
just add MDC when file mode is enable.
> 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