Revision 23de68fc
Added by Andreas Müller almost 2 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/hibernate/TaxonGraphHibernateListener.java | ||
---|---|---|
13 | 13 |
import java.util.HashMap; |
14 | 14 |
import java.util.Map; |
15 | 15 |
|
16 |
import org.apache.log4j.Logger; |
|
16 |
import org.apache.logging.log4j.LogManager; |
|
17 |
import org.apache.logging.log4j.Logger; |
|
17 | 18 |
import org.hibernate.action.spi.BeforeTransactionCompletionProcess; |
18 | 19 |
import org.hibernate.event.spi.PostInsertEvent; |
19 | 20 |
import org.hibernate.event.spi.PostUpdateEvent; |
... | ... | |
36 | 37 |
* |
37 | 38 |
* @author a.kohlbecker |
38 | 39 |
* @since Sep 27, 2018 |
39 |
* |
|
40 | 40 |
*/ |
41 | 41 |
public class TaxonGraphHibernateListener implements ITaxonGraphHibernateListener { |
42 | 42 |
|
43 |
private static final Logger logger = LogManager.getLogger(TaxonGraphHibernateListener.class); |
|
44 |
|
|
43 | 45 |
private static final long serialVersionUID = 5062518307839173935L; |
44 | 46 |
|
45 | 47 |
private Map<Class<? extends BeforeTransactionCompletionProcess>, ProcessConstructorData<? extends BeforeTransactionCompletionProcess>> beforeTransactionCompletionProcessTypes = new HashMap<>(); |
... | ... | |
68 | 70 |
event.getSession().getActionQueue().registerProcess(processorInstance); |
69 | 71 |
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException |
70 | 72 |
| InvocationTargetException | SecurityException e) { |
71 |
Logger.getLogger(TaxonGraphHibernateListener.class).error("Error creating new instance of " + type.toString(), e);
|
|
73 |
logger.error("Error creating new instance of " + type.toString(), e);
|
|
72 | 74 |
} |
73 | 75 |
} |
74 | 76 |
} |
... | ... | |
85 | 87 |
event.getSession().getActionQueue().registerProcess(processorInstance); |
86 | 88 |
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException |
87 | 89 |
| InvocationTargetException | SecurityException e) { |
88 |
Logger.getLogger(TaxonGraphHibernateListener.class).error("Error creating new instance of " + type.toString(), e);
|
|
90 |
logger.error("Error creating new instance of " + type.toString(), e);
|
|
89 | 91 |
} |
90 | 92 |
} |
91 | 93 |
} |
... | ... | |
102 | 104 |
event.getSession().getActionQueue().registerProcess(processorInstance); |
103 | 105 |
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException |
104 | 106 |
| InvocationTargetException | SecurityException e) { |
105 |
Logger.getLogger(TaxonGraphHibernateListener.class).error("Error creating new instance of " + type.toString(), e);
|
|
107 |
logger.error("Error creating new instance of " + type.toString(), e);
|
|
106 | 108 |
} |
107 | 109 |
} |
108 | 110 |
} |
Also available in: Unified diff
ref #9359 upgrade cdmlib to log4j 2