当前位置: 首页>>代码示例>>Java>>正文


Java Level.DEBUG属性代码示例

本文整理汇总了Java中org.slf4j.event.Level.DEBUG属性的典型用法代码示例。如果您正苦于以下问题:Java Level.DEBUG属性的具体用法?Java Level.DEBUG怎么用?Java Level.DEBUG使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.slf4j.event.Level的用法示例。


在下文中一共展示了Level.DEBUG属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: shouldLogToEventSinkWhenExceptionHasContextAndSessionId

@Test
public void shouldLogToEventSinkWhenExceptionHasContextAndSessionId() throws Exception {
    TestSamlTransformationErrorException exception = new TestSamlTransformationErrorException("error", new RuntimeException(), Level.DEBUG);
    SessionId sessionId = SessionId.createNewSessionId();
    when(httpServletRequest.getParameter(Urls.SharedUrls.SESSION_ID_PARAM)).thenReturn(sessionId.getSessionId());
    exceptionMapper.handleException(exception);

    verify(eventSinkMessageSender).audit(eq(exception), any(UUID.class), eq(sessionId));
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:9,代码来源:SamlProxySamlTransformationErrorExceptionMapperTest.java

示例2: shouldLogToEventSinkWhenExceptionHasContextAndNoSessionId

@Test
public void shouldLogToEventSinkWhenExceptionHasContextAndNoSessionId() throws Exception {
    TestSamlTransformationErrorException exception = new TestSamlTransformationErrorException("error", new RuntimeException(), Level.DEBUG);
    exceptionMapper.handleException(exception);

    verify(eventSinkMessageSender).audit(eq(exception), any(UUID.class), eq(SessionId.NO_SESSION_CONTEXT_IN_ERROR));
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:7,代码来源:SamlProxySamlTransformationErrorExceptionMapperTest.java

示例3: shouldLogExceptionAtCorrectLevel

@Test
public void shouldLogExceptionAtCorrectLevel() throws Exception {
    Level logLevel = Level.DEBUG;
    TestSamlTransformationErrorException exception = new TestSamlTransformationErrorException("error", new RuntimeException(), logLevel);
    exceptionMapper.handleException(exception);

    verify(levelLogger).log(eq(logLevel), eq(exception), any(UUID.class));
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:8,代码来源:SamlProxySamlTransformationErrorExceptionMapperTest.java

示例4: shouldCreateUnauditedErrorResponse

@Test
public void shouldCreateUnauditedErrorResponse() throws Exception {
    final SamlTransformationErrorException exception = new SamlTransformationErrorException("error", new RuntimeException(), Level.DEBUG);
    Response response = samlEngineExceptionMapper.toResponse(exception);

    ErrorStatusDto responseEntity = (ErrorStatusDto) response.getEntity();
    assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());
    assertThat(responseEntity.isAudited()).isFalse();

    checkLogLevel(exception.getLogLevel());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:11,代码来源:SamlEngineExceptionMapperTest.java

示例5: shouldHandleSamlTransformationErrorExceptionCorrectly

@Test
public void shouldHandleSamlTransformationErrorExceptionCorrectly() throws Exception {
    SamlTransformationErrorException exception = new SamlTransformationErrorException("error", new RuntimeException(), Level.DEBUG);

    final Response response = samlEngineExceptionMapper.toResponse(exception);

    ErrorStatusDto responseEntity = (ErrorStatusDto) response.getEntity();
    assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());
    assertThat(responseEntity.isAudited()).isFalse();
    assertThat(responseEntity.getExceptionType()).isEqualTo(ExceptionType.INVALID_SAML);

    checkLogLevel(exception.getLogLevel());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:13,代码来源:SamlEngineExceptionMapperTest.java

示例6: shouldHandleSamlFailedToDecryptErrorExceptionCorrectly

@Test
public void shouldHandleSamlFailedToDecryptErrorExceptionCorrectly() throws Exception {
    SamlTransformationErrorException exception = new SamlFailedToDecryptException("error", new RuntimeException(), Level.DEBUG);

    final Response response = samlEngineExceptionMapper.toResponse(exception);

    ErrorStatusDto responseEntity = (ErrorStatusDto) response.getEntity();
    assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());
    assertThat(responseEntity.isAudited()).isFalse();
    assertThat(responseEntity.getExceptionType()).isEqualTo(ExceptionType.INVALID_SAML_FAILED_TO_DECRYPT);

    checkLogLevel(exception.getLogLevel());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:13,代码来源:SamlEngineExceptionMapperTest.java

示例7: shouldHandleSamlRequestTooOldExceptionCorrectly

@Test
public void shouldHandleSamlRequestTooOldExceptionCorrectly() throws Exception {
    SamlTransformationErrorException exception = new SamlRequestTooOldException("error", new RuntimeException(), Level.DEBUG);

    final Response response = samlEngineExceptionMapper.toResponse(exception);

    ErrorStatusDto responseEntity = (ErrorStatusDto) response.getEntity();
    assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());
    assertThat(responseEntity.isAudited()).isFalse();
    assertThat(responseEntity.getExceptionType()).isEqualTo(ExceptionType.INVALID_SAML_REQUEST_TOO_OLD);

    checkLogLevel(exception.getLogLevel());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:13,代码来源:SamlEngineExceptionMapperTest.java

示例8: shouldHandleSamlDuplicateRequestIdExceptionCorrectly

@Test
public void shouldHandleSamlDuplicateRequestIdExceptionCorrectly() throws Exception {
    SamlTransformationErrorException exception = new SamlDuplicateRequestIdException("error", new RuntimeException(), Level.DEBUG);

    final Response response = samlEngineExceptionMapper.toResponse(exception);

    ErrorStatusDto responseEntity = (ErrorStatusDto) response.getEntity();
    assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());
    assertThat(responseEntity.isAudited()).isFalse();
    assertThat(responseEntity.getExceptionType()).isEqualTo(ExceptionType.INVALID_SAML_DUPLICATE_REQUEST_ID);

    checkLogLevel(exception.getLogLevel());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:13,代码来源:SamlEngineExceptionMapperTest.java

示例9: shouldHandleUnableToGenerateSamlExceptionCorrectly

@Test
public void shouldHandleUnableToGenerateSamlExceptionCorrectly() throws Exception {
    final UnableToGenerateSamlException exception = new UnableToGenerateSamlException("error", new RuntimeException(), Level.DEBUG);
    Response response = samlEngineExceptionMapper.toResponse(exception);

    ErrorStatusDto responseEntity = (ErrorStatusDto) response.getEntity();
    assertThat(response.getStatus()).isEqualTo(Response.Status.BAD_REQUEST.getStatusCode());
    assertThat(responseEntity.isAudited()).isFalse();
    assertThat(responseEntity.getExceptionType()).isEqualTo(ExceptionType.INVALID_INPUT);
    checkLogLevel(exception.getLogLevel());
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:11,代码来源:SamlEngineExceptionMapperTest.java


注:本文中的org.slf4j.event.Level.DEBUG属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。