Logging Glassfish LDAP日志正在填充日志文件

Logging Glassfish LDAP日志正在填充日志文件,logging,glassfish,ldap,glassfish-3,java.util.logging,Logging,Glassfish,Ldap,Glassfish 3,Java.util.logging,我们正在运行Glassfish 3.1.2.2,通过LDAP集成到Active Directory服务器。LDAP身份验证工作正常,但我们不断看到日志中充满了这样的消息: [#|2014-02-21T20:45:48.765+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=40;_ThreadName=Thread-2;|com.sun.jndi.

我们正在运行Glassfish 3.1.2.2,通过LDAP集成到Active Directory服务器。LDAP身份验证工作正常,但我们不断看到日志中充满了这样的消息:

[#|2014-02-21T20:45:48.765+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=40;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Connections@7e60743d.release(): notify; size: 1|#]
[#|2014-02-21T20:45:49.311+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|LdapPoolManager: using authmech: simple|#]
[#|2014-02-21T20:45:49.311+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Pool@11e21097 {x.x.x.x:389:::null:glassfish=com.sun.jndi.ldap.pool.ConnectionsRef@44f43371}.get(): x.x.x.x:389:::null:glassfish|#]
[#|2014-02-21T20:45:49.311+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Pool@11e21097 {x.x.x.x:389:::null:glassfish=com.sun.jndi.ldap.pool.ConnectionsRef@44f43371}.size: 1|#]
[#|2014-02-21T20:45:49.311+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Pool@11e21097 {x.x.x.x:389:::null:glassfish=com.sun.jndi.ldap.pool.ConnectionsRef@44f43371}.get(): size after: 1|#]
[#|2014-02-21T20:45:49.311+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Connections@7e60743d.get(): before; size: 1|#]
[#|2014-02-21T20:45:49.327+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|ConnectionDesc.tryUse() com.sun.jndi.ldap.LdapClient@5ec0d168 idle|#]
[#|2014-02-21T20:45:49.327+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Connections@7e60743d.get(): use com.sun.jndi.ldap.LdapClient@5ec0d168; size: 1|#]
[#|2014-02-21T20:45:49.327+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|Use com.sun.jndi.ldap.LdapClient@5ec0d168|#]
[#|2014-02-21T20:45:49.327+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Connections@7e60743d.get(): after; size: 1|#]
[#|2014-02-21T20:45:49.342+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Connections@7e60743d.release(): com.sun.jndi.ldap.LdapClient@5ec0d168; size: 1|#]
[#|2014-02-21T20:45:49.342+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|com.sun.jndi.ldap.pool.Connections@7e60743d.release(): release com.sun.jndi.ldap.LdapClient@5ec0d168; size: 1|#]
[#|2014-02-21T20:45:49.342+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-2;|Release com.sun.jndi.ldap.LdapClient@5ec0d168|#]
这只是一个样本;这样的日志记录会无休止地重复,以至于我们的绝大多数日志文件都由这些语句组成。奇怪的是,这些信息被记录在严重级别,但在我看来,这些信息具有信息性。没有一个听起来像是真正的错误

我的第一个想法是将javax.enterprise.system.std.com.sun.enterprise.server.logging配置为只记录致命级别的日志。这确实消除了上面的日志消息,但不幸的是,它也关闭了Glassfish中所有其他有用的日志记录,因此它不是一个真正的选项


你知道上面的日志消息是什么意思,以及如何关闭它们吗?谢谢。

这看起来像是LDAP连接池的日志记录。我不知道您到底是如何实现LDAP集成的,但根据默认情况,此日志记录未启用,您必须将其设置为JVM属性

com.sun.jndi.ldap.connect.pool.debug
这可以设置为
fine
all
,不幸的是,除了删除此属性外,没有明确的选项将其关闭

com.sun.jndi.ldap.connect.pool.debug
您可以使用以下选项之一进行设置:

System.setProperty("com.sun.jndi.ldap.connect.pool.debug", "all");
或者作为GlassFish管理GUI中的附加JVM选项

-Dcom.sun.jndi.ldap.connect.pool.debug=all
这可能是在您的代码或GlassFish实例中设置的。

如果这没有帮助,您可以尝试将
com.sun.jndi.ldap.connect.pool
的日志级别设置为
OFF

另请参见:


我查看了我们的服务器,果然我们将该属性的值设置为“all”。尽管我还没有机会进行测试,但根据文档,这听起来确实是个问题。谢谢