mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-23 12:32:13 +00:00
SEC-1458: Remove logger field in HttpSessionEventPublisher in favour of direct lookup. Prevents early initialization of logging system when listener is initialized.
This commit is contained in:
parent
9d2e2ca11d
commit
0760bb947b
@ -44,7 +44,7 @@ import javax.servlet.http.HttpSessionListener;
|
|||||||
public class HttpSessionEventPublisher implements HttpSessionListener {
|
public class HttpSessionEventPublisher implements HttpSessionListener {
|
||||||
//~ Static fields/initializers =====================================================================================
|
//~ Static fields/initializers =====================================================================================
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(HttpSessionEventPublisher.class);
|
private static final String LOGGER_NAME = HttpSessionEventPublisher.class.getName();
|
||||||
|
|
||||||
//~ Methods ========================================================================================================
|
//~ Methods ========================================================================================================
|
||||||
|
|
||||||
@ -60,6 +60,7 @@ public class HttpSessionEventPublisher implements HttpSessionListener {
|
|||||||
*/
|
*/
|
||||||
public void sessionCreated(HttpSessionEvent event) {
|
public void sessionCreated(HttpSessionEvent event) {
|
||||||
HttpSessionCreatedEvent e = new HttpSessionCreatedEvent(event.getSession());
|
HttpSessionCreatedEvent e = new HttpSessionCreatedEvent(event.getSession());
|
||||||
|
Log log = LogFactory.getLog(LOGGER_NAME);
|
||||||
|
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Publishing event: " + e);
|
log.debug("Publishing event: " + e);
|
||||||
@ -76,6 +77,7 @@ public class HttpSessionEventPublisher implements HttpSessionListener {
|
|||||||
*/
|
*/
|
||||||
public void sessionDestroyed(HttpSessionEvent event) {
|
public void sessionDestroyed(HttpSessionEvent event) {
|
||||||
HttpSessionDestroyedEvent e = new HttpSessionDestroyedEvent(event.getSession());
|
HttpSessionDestroyedEvent e = new HttpSessionDestroyedEvent(event.getSession());
|
||||||
|
Log log = LogFactory.getLog(LOGGER_NAME);
|
||||||
|
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Publishing event: " + e);
|
log.debug("Publishing event: " + e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user