You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by lindzh <gi...@git.apache.org> on 2017/06/08 13:24:49 UTC

[GitHub] incubator-rocketmq-site pull request #18: [ROCKETMQ-194]Add logappender exam...

GitHub user lindzh opened a pull request:

    https://github.com/apache/incubator-rocketmq-site/pull/18

    [ROCKETMQ-194]Add logappender example

    add logappender example

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lindzh/incubator-rocketmq-site logappender

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-rocketmq-site/pull/18.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18
    
----
commit 833ade9091eca6467d498c457ee67310f27a18ee
Author: 鲁般 <de...@alibaba-inc.com>
Date:   2017-06-08T13:19:26Z

    add logappender example

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rocketmq-site pull request #18: [ROCKETMQ-194]Add logappender exam...

Posted by vongosling <gi...@git.apache.org>.
Github user vongosling commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq-site/pull/18#discussion_r120898077
  
    --- 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.
    --- End diff --
    
    1. rocketmq vs. Rocketmq, which one
    2. RocketMQ's logappender


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rocketmq-site pull request #18: [ROCKETMQ-194]Add logappender exam...

Posted by lizhanhui <gi...@git.apache.org>.
Github user lizhanhui commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq-site/pull/18#discussion_r121620804
  
    --- 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.
    --- End diff --
    
    "Rocketmq logappender provides log4j appender,logback appender and log4j2 appender for bussiness to use,below is some example."--> RocketMQ log appender provides log4j, logback and log4j2 appenders for business developers. The following are some examples.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rocketmq-site pull request #18: [ROCKETMQ-194]Add logappender exam...

Posted by vongosling <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rocketmq-site pull request #18: [ROCKETMQ-194]Add logappender exam...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-rocketmq-site/pull/18


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---