本文整理汇总了Java中ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor类的典型用法代码示例。如果您正苦于以下问题:Java LoggingInterceptor类的具体用法?Java LoggingInterceptor怎么用?Java LoggingInterceptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LoggingInterceptor类属于ca.uhn.fhir.rest.server.interceptor包,在下文中一共展示了LoggingInterceptor类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initialize
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; //导入依赖的package包/类
@Override
protected void initialize() throws ServletException {
// ... define your resource providers here ...
// Now register the logging interceptor
LoggingInterceptor loggingInterceptor = new LoggingInterceptor();
registerInterceptor(loggingInterceptor);
// The SLF4j logger "test.accesslog" will receive the logging events
loggingInterceptor.setLoggerName("test.accesslog");
// This is the format for each line. A number of substitution variables may
// be used here. See the JavaDoc for LoggingInterceptor for information on
// what is available.
loggingInterceptor.setMessageFormat("Source[${remoteAddr}] Operation[${operationType} ${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}]");
}
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:19,代码来源:ServletExamples.java
示例2: loggingInterceptor
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; //导入依赖的package包/类
/**
* Do some fancy logging to create a nice access log that has details about each incoming request.
*/
public IServerInterceptor loggingInterceptor() {
LoggingInterceptor retVal = new LoggingInterceptor();
retVal.setLoggerName("fhirtest.access");
retVal.setMessageFormat(
"Path[${servletPath}] Source[${requestHeader.x-forwarded-for}] Operation[${operationType} ${operationName} ${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}] ResponseEncoding[${responseEncodingNoDefault}]");
retVal.setLogExceptions(true);
retVal.setErrorMessageFormat("ERROR - ${requestVerb} ${requestUrl}");
return retVal;
}
开发者ID:Discovery-Research-Network-SCCM,项目名称:FHIR-CQL-ODM-service,代码行数:13,代码来源:FhirServerTestConfigDstu3.java
示例3: loggingInterceptor
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; //导入依赖的package包/类
/**
* Do some fancy logging to create a nice access log that has details about each incoming request.
*/
public IServerInterceptor loggingInterceptor() {
LoggingInterceptor retVal = new LoggingInterceptor();
retVal.setLoggerName("fhirtest.access");
retVal.setMessageFormat(
"Path[${servletPath}] Source[${requestHeader.x-forwarded-for}] Operation[${operationType} ${operationName} ${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}] ResponseEncoding[${responseEncodingNoDefault}]");
retVal.setLogExceptions(true);
retVal.setErrorMessageFormat("ERROR - ${requestVerb} ${requestUrl}");
return retVal;
}
开发者ID:daimor,项目名称:isc-hapi-fhir-jpaserver,代码行数:13,代码来源:FhirServerConfig.java
示例4: loggingInterceptor
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; //导入依赖的package包/类
public IServerInterceptor loggingInterceptor() {
LoggingInterceptor retVal = new LoggingInterceptor();
retVal.setLoggerName("fhirtest.access");
retVal.setMessageFormat(
"Path[${servletPath}] Source[${requestHeader.x-forwarded-for}] Operation[${operationType} ${operationName} ${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}] ResponseEncoding[${responseEncodingNoDefault}]");
retVal.setLogExceptions(true);
retVal.setErrorMessageFormat("ERROR - ${requestVerb} ${requestUrl}");
return retVal;
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:10,代码来源:FhirServerConfigDstu3.java
示例5: accessLoggingInterceptor
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; //导入依赖的package包/类
/**
* Do some fancy logging to create a nice access log that has details about each incoming request.
*/
@Bean
public IServerInterceptor accessLoggingInterceptor() {
LoggingInterceptor retVal = new LoggingInterceptor();
retVal.setLoggerName("fhirtest.access");
retVal.setMessageFormat(
"Path[${servletPath}] Source[${requestHeader.x-forwarded-for}] Operation[${operationType} ${operationName} ${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}] ResponseEncoding[${responseEncodingNoDefault}]");
retVal.setLogExceptions(true);
retVal.setErrorMessageFormat("ERROR - ${requestVerb} ${requestUrl}");
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:14,代码来源:CommonConfig.java
示例6: requestLoggingInterceptor
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; //导入依赖的package包/类
/**
* Do some fancy logging to create a nice access log that has details about each incoming request.
*/
@Bean
public IServerInterceptor requestLoggingInterceptor() {
LoggingInterceptor retVal = new LoggingInterceptor();
retVal.setLoggerName("fhirtest.request");
retVal.setMessageFormat("${requestVerb} ${servletPath} -\n${requestBodyFhir}");
retVal.setLogExceptions(false);
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:12,代码来源:CommonConfig.java
示例7: loggingInterceptor
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; //导入依赖的package包/类
@Bean
public LoggingInterceptor loggingInterceptor() {
return new LoggingInterceptor();
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:5,代码来源:SampleJerseyRestfulServerApplication.java
注:本文中的ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论