• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LoggingInterceptor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JRPrinterAWT类代码示例发布时间:2022-05-23
下一篇:
Java OnMenuItemClickListener类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap