mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:03:22 +08:00
Lower logging level of audit events
Closes gh-3107
This commit is contained in:
parent
b384f0360c
commit
641ceca3a9
@ -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<AuditApplicationEvent> {
|
||||
|
||||
@ -39,7 +40,9 @@ public class AuditListener implements ApplicationListener<AuditApplicationEvent>
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(AuditApplicationEvent event) {
|
||||
logger.info(event.getAuditEvent());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(event.getAuditEvent());
|
||||
}
|
||||
this.auditEventRepository.add(event.getAuditEvent());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user