INTSAMPLES-150: Switch to Log4j2

JIRA: https://jira.spring.io/browse/INTSAMPLES-150
This commit is contained in:
Gary Russell
2017-08-28 16:24:00 -04:00
committed by Artem Bilan
parent 68377fedd1
commit e37904128e
240 changed files with 5202 additions and 2533 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright 2002-2008 the original author or authors.
/* Copyright 2002-2017 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.
@@ -15,19 +15,22 @@
package org.springframework.integration.samples.errorhandling;
import org.apache.log4j.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.annotation.MessageEndpoint;
/**
* This guest receives invitations, but returns them to sender with a wrong
* address exception message.
*
*
* @author Iwein Fuld
* @author Gary Russell
*/
@MessageEndpoint
public class PartyGuest {
private Logger logger = Logger.getLogger(PartyGuest.class);
private final Log logger = LogFactory.getLog(PartyGuest.class);
public void onInvitation(Invitation invitation) {
logger.info("Guest is throwing exception");
throw new RuntimeException("Wrong address");

View File

@@ -1,4 +1,4 @@
/* Copyright 2002-2008 the original author or authors.
/* Copyright 2002-2017 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.
@@ -17,18 +17,21 @@ package org.springframework.integration.samples.errorhandling;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.log4j.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.annotation.MessageEndpoint;
/**
* Sends invitations to <code>PartyGuest</code>s and likes to be notified of
* delivery failures of course.
*
*
* @author Iwein Fuld
* @author Gary Russell
*/
@MessageEndpoint
public class PartyHost {
private Logger logger = Logger.getLogger(PartyHost.class);
private final Log logger = LogFactory.getLog(PartyHost.class);
private final AtomicInteger counter = new AtomicInteger(0);
public Invitation nextInvitation() {