Class AccessLogFilter

java.lang.Object
org.apache.dubbo.rpc.filter.AccessLogFilter
All Implemented Interfaces:
BaseFilter, Filter

@Activate(group="provider") public class AccessLogFilter extends Object implements Filter
Record access log for the service.

Logger key is dubbo.accesslog. In order to configure access log appear in the specified appender only, additivity need to be configured in log4j's config file, for example:

 <logger name="dubbo.accesslog" additivity="false">
    <level value="info" />
    <appender-ref ref="foo" />
 </logger>
 
  • Field Details

  • Constructor Details

    • AccessLogFilter

      public AccessLogFilter()
      Default constructor initialize demon thread for writing into access log file with names with access log key defined in url accesslog
  • Method Details

    • invoke

      public Result invoke(Invoker<?> invoker, Invocation inv) throws RpcException
      This method logs the access log for service method invocation call.
      Specified by:
      invoke in interface BaseFilter
      Parameters:
      invoker - service
      inv - Invocation service method.
      Returns:
      Result from service method.
      Throws:
      RpcException
    • setInterval

      public static void setInterval(long interval)
    • getInterval

      public static long getInterval()
    • destroy

      public void destroy()