本文整理汇总了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));
}
示例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));
}
示例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));
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}