From 641ceca3a9d35f0ca7187ed639222e131bc37265 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 12 Jun 2015 17:56:21 +0200 Subject: [PATCH] Lower logging level of audit events Closes gh-3107 --- .../boot/actuate/audit/listener/AuditListener.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/listener/AuditListener.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/listener/AuditListener.java index f7a5d7f4d3..d84dc446d0 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/listener/AuditListener.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/listener/AuditListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import org.springframework.context.ApplicationListener; * them in a {@link AuditEventRepository}. * * @author Dave Syer + * @author Stephane Nicoll */ public class AuditListener implements ApplicationListener { @@ -39,7 +40,9 @@ public class AuditListener implements ApplicationListener @Override public void onApplicationEvent(AuditApplicationEvent event) { - logger.info(event.getAuditEvent()); + if (logger.isDebugEnabled()) { + logger.debug(event.getAuditEvent()); + } this.auditEventRepository.add(event.getAuditEvent()); }