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

Ranjit Mathew resolved PIG-1750.
--------------------------------

    Resolution: Invalid

I fixed my {{log4j.properties}} file to use only Categories like this:
{code}
log4j.rootCategory=WARN, R

log4j.category.org.apache.pig=WARN, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.layout = org.apache.log4j.PatternLayout
log4j.appender.R.File = mylogs.log
log4j.appender.R.Append = true
log4j.appender.R.MaxFileSize = 100KB
log4j.appender.R.MaxBackupIndex = 2
{code}
and this issue goes away:
{code}
$ pig -log4jconf ./log4j.properties -x local
grunt> junk
Details at logfile: /home/ranjit/pig-0.8.0-SNAPSHOT/pig_1290750549210.log
grunt> 
{code}
There should be a PEBKAC code for resolving tickets. :-/

> "Attempted to append to closed appender" error with log4j.properties
> --------------------------------------------------------------------
>
>                 Key: PIG-1750
>                 URL: https://issues.apache.org/jira/browse/PIG-1750
>             Project: Pig
>          Issue Type: Bug
>          Components: grunt
>    Affects Versions: 0.8.0
>            Reporter: Ranjit Mathew
>
> If I invoke Pig 0.8.0 with a custom {{log4j.properties}}, everything seems 
> fine until there's an error:
> {code}
> $ pig -log4jconf log4j.properties -x local
> grunt> foo
> log4j:ERROR Attempted to append to closed appender named [R].
> log4j:ERROR Attempted to append to closed appender named [R].
> Details at logfile: /home/ranjit/pig-0.8.0-SNAPSHOT/pig_1290680245562.log
> {code}
> The file {{pig_1290680245562.log}} contains the syntax-error message.
> My {{log4j.properties}} file looks like this:
> {code}
> log4j.rootCategory=WARN, R
> log4j.rootLogger=WARN, R
> log4j.category.org.apache.pig=WARN, R
> log4j.logger.org.apache.pig=WARN, R
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.layout = org.apache.log4j.PatternLayout
> log4j.appender.R.File = mylogs.log
> log4j.appender.R.Append = true
> log4j.appender.R.MaxFileSize = 100KB
> log4j.appender.R.MaxBackupIndex = 2
> {code}

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

Reply via email to