我是Infinispan的新手。我正在使用Infinispan版本(8.1.3)运行具有三个非对称节点的集群。我想跟踪我的日志中的请求,这些请求是在节点之间发送的,如故障检测请求或TCP Ping。但这些请求不在我的打印中infinispan log。我正在使用log4j进行日志记录,我不知道如何使用JDK记录器。
如何在Infinispan中记录/捕获JGroups的请求?
也有人可以帮助我如何在Infinispan中使用JDKLogging吗?
我的log4j配置是:
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
<appender name="ROLL" class="org.apache.log4j.DailyRollingFileAppender">
<param name="Threshold" value="INFO"/>
<param name="Target" value="System.out"/>
<param name="Append" value="true"/>
<param name="ImmediateFlush" value="true"/>
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
<param name="File" value="InfinispanLogs/infinispan.log"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c{1}] (%t) %m%n"/>
</layout>
</appender>
<!-- ================ -->
<!-- Limit categories -->
<!-- ================ -->
<category name="org.infinispan">
<priority value="TRACE"/>
</category>
<category name="org.jgroups">
<priority value="TRACE"/>
</category>
<!-- ======================= -->
<!-- Setup the Root category -->
<root>
<priority value="TRACE"/>
<appender-ref ref="ROLL"/>
</root>
</log4j:configuration>
我的JGroups配置是:
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
<UDP
bind_port="${jgroups_port:9012}"
ip_mcast="false"
ip_ttl="4"
tos="8"
ucast_recv_buf_size="5M"
ucast_send_buf_size="5M"
mcast_recv_buf_size="5M"
mcast_send_buf_size="5M"
max_bundle_size="64K"
max_bundle_timeout="30"
enable_diagnostics="true"
thread_naming_pattern="cl"
timer_type="new3"
timer.min_threads="2"
timer.max_threads="4"
timer.keep_alive_time="3000"
timer.queue_max_size="500"
thread_pool.enabled="true"
thread_pool.min_threads="2"
thread_pool.max_threads="8"
thread_pool.keep_alive_time="5000"
thread_pool.queue_enabled="true"
thread_pool.queue_max_size="10000"
thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
oob_thread_pool.min_threads="5"
oob_thread_pool.max_threads="10"
oob_thread_pool.keep_alive_time="5000"
oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="discard"/>
<TCPPING initial_hosts="x.xx.xx.xxx[9011],x.xx.xx.xxx[9012],x.xx.xx.xxx[9013],x.xx.xx.xxx[9014]" port_range="0" />
<MERGE3 max_interval="30000"
min_interval="10000"/>
<FD_SOCK/>
<FD_ALL timeout="12000" interval="3000" timeout_check_interval="2000"/>
<VERIFY_SUSPECT timeout="1500" />
<BARRIER />
<pbcast.NAKACK2 xmit_interval="500"
xmit_table_num_rows="100"
xmit_table_msgs_per_row="2000"
xmit_table_max_compaction_time="30000"
max_msg_batch_size="500"
use_mcast_xmit="false"
discard_delivered_msgs="true"/>
<UNICAST3 xmit_interval="500"
xmit_table_num_rows="100"
xmit_table_msgs_per_row="2000"
xmit_table_max_compaction_time="60000"
conn_expiry_timeout="0"
max_msg_batch_size="500"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
max_bytes="4M"/>
<pbcast.GMS print_local_addr="true" join_timeout="2000"
view_bundling="true"/>
<UFC max_credits="2M"
min_threshold="0.4"/>
<MFC max_credits="2M"
min_threshold="0.4"/>
<FRAG2 frag_size="60K" />
<RSVP resend_interval="2000" timeout="10000"/>
<pbcast.STATE_TRANSFER />
<!-- pbcast.FLUSH /-->
</config>
先谢谢,))
答案 0 :(得分:1)
我猜你的appender需要TRACE而不是INFO:
<param name="Threshold" value="TRACE"/>