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

Remko Popma edited comment on LOG4J2-482 at 1/4/14 3:46 AM:
------------------------------------------------------------

Hmm... Perhaps I was too enthusiastic there...

After taking another good look, using {{ref}} (and not {{AppenderRef}}) may be 
the most _consistent_.
For reference, {{Root}} and {{Logger}} config elements look like this:
{code}
    <Root level="info">
      <AppenderRef ref="RollingFile"/>
    </Root>
{code}

Compare to the {{Route}} config element:
{code}
    <Routing name="Routing">
      <Routes pattern="$${sd:type}">
        ...
        <Route ref="AuditLogger" key="Audit"/>
      </Routes>
    </Routing>
{code}

So it looks like just fixing the documentation was the correct thing to do and 
there is no need for further code changes.
I will mark this issue as 'fixed' again. Sorry for the confusion. 


was (Author: rem...@yahoo.com):
Hmm... Perhaps I was too enthusiastic there...

After taking another good look, using {{ref}} (and not {{AppenderRef}} may be 
the most _consistent_.
For reference, {{Root}} and {{Logger}} config elements look like this:
{code}
    <Root level="info">
      <AppenderRef ref="RollingFile"/>
    </Root>
{code}

Compare to the {{Route}} config element:
{code}
    <Routing name="Routing">
      <Routes pattern="$${sd:type}">
        ...
        <Route ref="AuditLogger" key="Audit"/>
      </Routes>
    </Routing>
{code}

So it looks like just fixing the documentation was the correct thing to do and 
there is no need for further code changes.
I will mark this issue as 'fixed' again. Sorry for the confusion. 

> The attribute of Route to refer to an appender is "ref" not "AppenderRef"
> -------------------------------------------------------------------------
>
>                 Key: LOG4J2-482
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-482
>             Project: Log4j 2
>          Issue Type: Documentation
>          Components: Appenders
>    Affects Versions: 2.0-beta9
>            Reporter: Hongdi Ren
>            Assignee: Remko Popma
>            Priority: Minor
>              Labels: documentation
>             Fix For: 2.0-rc1
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> First of all, thanks for so much enhancements on log4j2. : )
> Just a small problem of the manual. The example of 
> Routes(http://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender)
>  uses attribute "AppenderRef" to reference an appender, which is not correct. 
> I've searched the source code, find the attribute should be "ref". 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to