Skip to content

Commit

Permalink
Fix logging tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olle committed Mar 1, 2023
1 parent 3144f92 commit 84f05f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ default void debugLogPublished(String type, String routingKey, Message message)
default void logPublished(String type, String routingKey, Message message) {

if (log().isTraceEnabled()) {
log().trace("|<-- Published {}: {} - {}", type, routingKey, message);
log().debug("|<-- Published {}: {} - {}", type, routingKey, message);
} else {
log().debug("|<-- Published {}: {} - {}", type, routingKey, toStringRedacted(message));
log().info("|<-- Published {}: {} - {}", type, routingKey, toStringRedacted(message));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RabbitFacadeLoggerTest {
@Test
void ensureDebugLoggingFormattedWithFullMessage() {

when(log.isDebugEnabled()).thenReturn(true);
when(log.isTraceEnabled()).thenReturn(true);

LogMockingRabbitFacade sut = new LogMockingRabbitFacade(log);

Expand All @@ -52,7 +52,7 @@ void ensureDebugLoggingFormattedWithFullMessage() {
@Test
void ensureInfoLoggingFormattedWithCustomStringWithoutBodyJson() throws Exception {

when(log.isDebugEnabled()).thenReturn(false);
when(log.isTraceEnabled()).thenReturn(false);

LogMockingRabbitFacade sut = new LogMockingRabbitFacade(log);

Expand Down

0 comments on commit 84f05f2

Please sign in to comment.