Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/367.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何消除Glassfish上特定包的精细日志消息_Java_Logging_Glassfish 3 - Fatal编程技术网

Java 如何消除Glassfish上特定包的精细日志消息

Java 如何消除Glassfish上特定包的精细日志消息,java,logging,glassfish-3,Java,Logging,Glassfish 3,我在玩arround的日志文件,不知何故我禁用了所有与日志相关的信息,但javax.enterprise.system.core.security仍然显示良好的日志级别,是否有任何方法将此更改为级别警告并将其余日志级别重置为默认值。我必须滚动太多才能找到我的异常 [#|2014-07-28T14:02:42.181+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.secu

我在玩arround的日志文件,不知何故我禁用了所有与日志相关的信息,但javax.enterprise.system.core.security仍然显示良好的日志级别,是否有任何方法将此更改为级别警告并将其余日志级别重置为默认值。我必须滚动太多才能找到我的异常

[#|2014-07-28T14:02:42.181+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecClientRequestInterceptor;MethodName=send_request;|Security context is null (nothing to add to service context)|#]

[#|2014-07-28T14:02:42.182+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecServerRequestInterceptor;MethodName=receive_request;|++++ Entered SecServerRequestInterceptor::receive_request|#]

[#|2014-07-28T14:02:42.182+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecServerRequestInterceptor;MethodName=handle_null_service_context;|No SAS context element found in service context list for operation: _is_a|#]

[#|2014-07-28T14:02:42.183+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecurityContextUtil;MethodName=setSecurityContext;|ABOUT TO EVALUATE TRUST|#]

[#|2014-07-28T14:02:42.183+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecClientRequestInterceptor;MethodName=receive_reply;|++++ Entered SecClientRequestInterceptor::receive_reply|#]

[#|2014-07-28T14:02:42.184+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecClientRequestInterceptor;MethodName=handle_null_service_context;|No SAS context element found in service context list|#]

[#|2014-07-28T14:02:42.184+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecClientRequestInterceptor;MethodName=setreplyStatus;|Status to be set : 0|#]

[#|2014-07-28T14:02:42.185+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecurityContextUtil;MethodName=receivedReply;|Passed status|#]

[#|2014-07-28T14:02:42.185+0500|FINE|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.iiop.security|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.enterprise.iiop.security.SecClientRequestInterceptor;MethodName=setreplyStatus;|Invoked receivedReply()|#]

如果您使用的是log4j,那么可以创建log4j类别和后续附件来控制日志记录

例如:类别:

log4j.category.javax.enterprise.system.core.security=WARN, S
附录:

log4j.appender.S=org.apache.log4j.RollingFileAppender
log4j.appender.S.File=${myWebapp-instance-root}/log/External.log
log4j.appender.S.MaxFileSize=1MB
log4j.appender.S.MaxBackupIndex=10
log4j.appender.S.layout=org.apache.log4j.PatternLayout
log4j.appender.S.layout.ConversionPattern=%d %p %t %c - %m%n