2

Jetty 8 と ZooKeeper 3.4.5 を使用しています。ZooKeeper に接続すると、jetty は DEBUG レベルのメッセージを生成し続けます。抑える方法は?

16:54:56.757 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:56.758 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:56.758 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:56.759 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:56.760 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:56.760 [main-SendThread(127.0.0.1:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x13ddc6e9a2b000c after 3ms
16:54:56.760 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:58.424 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:58.425 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:58.425 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:58.426 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:58.427 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration
16:54:58.427 [main-SendThread(127.0.0.1:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x13ddc6e9a2b000c after 2ms

src フォルダーの下に log4j.properties を追加しました。

# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r - [%t] %-5p %c %x - %m%n

log4j.logger.org.apache.zookeeper.ZooKeeper=INFO

まだ運がありません。

4

2 に答える 2

1

設定で次のようなものが役立つはずです:

<logger name="com.apache.zookeeper" level="info">
   <!-- appenders -->
</logger>
于 2013-04-06T08:50:31.120 に答える