accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2343) Create Appender specifically for log-forwarding
Date Fri, 18 Apr 2014 13:41:19 GMT

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

Bill Havanki commented on ACCUMULO-2343:
----------------------------------------

To make this more concrete: Here is a current example configuration using the separate, stock
{{AsyncAppender}} and {{SocketAppender}}.

{code:xml}
<appender name="N1" class="org.apache.log4j.net.SocketAppender">
     <param name="remoteHost"     value="${org.apache.accumulo.core.host.log}"/>
     <param name="port"           value="${org.apache.accumulo.core.host.log.port}"/>
     <param name="application"    value="${org.apache.accumulo.core.application}:${org.apache.accumulo.core.ip.localhost.hostname}"/>
     <param name="Threshold"      value="WARN"/>
  </appender>
  <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
     <appender-ref ref="N1" />
  </appender>
{code}

Here is an updated configuration using {{AsyncSocketAppender}}.

{code:xml}
<appender name="ASYNC" class="org.apache.accumulo.core.util.AsyncSocketAppender">
     <param name="remoteHost"     value="${org.apache.accumulo.core.host.log}"/>
     <param name="port"           value="${org.apache.accumulo.core.host.log.port}"/>
     <param name="application"    value="${org.apache.accumulo.core.application}:${org.apache.accumulo.core.ip.localhost.hostname}"/>
     <param name="Threshold"      value="WARN"/>
  </appender>
{code}

The same parameters passed to the stock socket appender can be passed to {{AsyncSocketAppender}}.
Specifically, the logging-related system properties set in {{Accumulo.init()}} are used in
the same way to the same effect; this is because the new appender merely embeds a socket appender
and supports its parameters, passing through to it.

The main purpose of this ticket is to allow configuring Log4J via a properties file. Except
for that specific purpose, there is really no compelling reason to switch from the stock appenders.
Example Log4J XML files can remain as they are, and there would be no point in changing deployed
Log4J XML files in 1.6.0 deployments.

> Create Appender specifically for log-forwarding
> -----------------------------------------------
>
>                 Key: ACCUMULO-2343
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2343
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: monitor, tserver
>            Reporter: Josh Elser
>            Assignee: Bill Havanki
>            Priority: Minor
>             Fix For: 1.6.1, 1.7.0
>
>
> Currently, the log4j configuration defines an AsyncAppender which wraps a SocketAppender.
It would likely be cleaner, and easy to track, if we created our own AccumuloMonitorAppender
(or similar).
> This would make disabling log-forwarding when the monitor is dead easier to accomplish.
It might also allow for reuse of this functionality.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message