Github user vongosling commented on a diff in the pull request:

    
https://github.com/apache/incubator-rocketmq-site/pull/18#discussion_r120898962
  
    --- Diff: _docs/20-logappender-example.md ---
    @@ -0,0 +1,80 @@
    +---
    +title: "Logappender Example"
    +permalink: /docs/logappender-example/
    +excerpt: "How to use logappender in RocketMQ."
    +modified: 2017-06-08T21:01:43-04:00
    +---
    +
    +{% include toc %}
    +
    +When we use rocketmq as a part of big data processing or other 
cases,bussiness also need to put log data to rocketmq.Rocketmq logappender 
provides log4j appender,logback appender and log4j2 appender for bussiness to 
use,below is some example.
    +
    +#### log4j 
    +
    +When using log4j properties config file,config as below.
    +
    +```
    
+log4j.appender.mq=org.apache.rocketmq.logappender.log4j.RocketmqLog4jAppender
    +log4j.appender.mq.Tag=yourTag
    +log4j.appender.mq.Topic=yourLogTopic
    +log4j.appender.mq.ProducerGroup=yourLogGroup
    +log4j.appender.mq.NameServerAddress=yourRocketmqNameserverAddress
    +log4j.appender.mq.layout=org.apache.log4j.PatternLayout
    +log4j.appender.mq.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-4r 
[%t] (%F:%L) %-5p - %m%n
    +```
    +
    +When using log4j xml config file,config it as this and also add a async 
appender:
    +
    +```
    +<appender name="mqAppender1" 
class="org.apache.rocketmq.logappender.log4j.RocketmqLog4jAppender">
    +    <param name="Tag" value="yourTag" />
    --- End diff --
    
    capitalize the first letter in name?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to