Package org.apache.dubbo.rpc.filter
Class AccessLogFilter
java.lang.Object
org.apache.dubbo.rpc.filter.AccessLogFilter
- All Implemented Interfaces:
BaseFilter,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>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.dubbo.rpc.BaseFilter
BaseFilter.Listener -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor initialize demon thread for writing into access log file with names with access log key defined in url accesslog -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()static longinvoke(Invoker<?> invoker, Invocation inv) This method logs the access log for service method invocation call.static voidsetInterval(long interval)
-
Field Details
-
logger
-
-
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
This method logs the access log for service method invocation call.- Specified by:
invokein interfaceBaseFilter- Parameters:
invoker- serviceinv- 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()
-