mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
Refactor additional loggers for log4jv2
This commit is contained in:

committed by
Mark H. Wood

parent
35b5c6c321
commit
bda4fa0ba7
@@ -28,7 +28,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
* @author kevinvandevelde at atmire.com
|
||||
*/
|
||||
public class MostRecentChecksumServiceImpl implements MostRecentChecksumService {
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(MostRecentChecksumServiceImpl.class);
|
||||
private static final Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(MostRecentChecksumServiceImpl.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected MostRecentChecksumDAO mostRecentChecksumDAO;
|
||||
|
@@ -32,7 +32,8 @@ import org.dspace.content.Collection;
|
||||
*/
|
||||
public class InputFormSelfRegisterWrapperAuthority implements ChoiceAuthority {
|
||||
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(InputFormSelfRegisterWrapperAuthority.class);
|
||||
private static Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(InputFormSelfRegisterWrapperAuthority.class);
|
||||
|
||||
private Map<String, ChoiceAuthority> delegates = new HashMap<String, ChoiceAuthority>();
|
||||
|
||||
|
@@ -35,7 +35,8 @@ public class CreativeCommonsRDFStreamDisseminationCrosswalk
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(CreativeCommonsRDFStreamDisseminationCrosswalk.class);
|
||||
private static Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(CreativeCommonsRDFStreamDisseminationCrosswalk.class);
|
||||
protected BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
|
||||
protected CreativeCommonsService creativeCommonsService = LicenseServiceFactory.getInstance()
|
||||
.getCreativeCommonsService();
|
||||
|
@@ -38,7 +38,8 @@ public class CreativeCommonsRDFStreamIngestionCrosswalk
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(CreativeCommonsRDFStreamIngestionCrosswalk.class);
|
||||
private static Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(CreativeCommonsRDFStreamIngestionCrosswalk.class);
|
||||
|
||||
protected CreativeCommonsService creativeCommonsService = LicenseServiceFactory.getInstance()
|
||||
.getCreativeCommonsService();
|
||||
|
@@ -42,7 +42,8 @@ public class CreativeCommonsTextStreamDisseminationCrosswalk
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(CreativeCommonsTextStreamDisseminationCrosswalk.class);
|
||||
private static Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(CreativeCommonsTextStreamDisseminationCrosswalk.class);
|
||||
|
||||
@Override
|
||||
public boolean canDisseminate(Context context, DSpaceObject dso) {
|
||||
|
@@ -34,7 +34,8 @@ public class LicenseStreamDisseminationCrosswalk
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(LicenseStreamDisseminationCrosswalk.class);
|
||||
private static Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(LicenseStreamDisseminationCrosswalk.class);
|
||||
protected BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();
|
||||
|
||||
@Override
|
||||
|
@@ -19,6 +19,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -65,8 +66,7 @@ public class XHTMLHeadDisseminationCrosswalk extends SelfNamedPlugin implements
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger
|
||||
.getLogger(XHTMLHeadDisseminationCrosswalk.class);
|
||||
private static Logger log = LogManager.getLogger(XHTMLHeadDisseminationCrosswalk.class);
|
||||
|
||||
/**
|
||||
* Location of config file
|
||||
|
@@ -39,7 +39,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class SolrServiceResourceRestrictionPlugin implements SolrServiceIndexPlugin, SolrServiceSearchPlugin {
|
||||
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SolrServiceResourceRestrictionPlugin.class);
|
||||
private static final Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(SolrServiceResourceRestrictionPlugin.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected AuthorizeService authorizeService;
|
||||
|
@@ -26,8 +26,8 @@ import org.apache.commons.cli.Option;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.PosixParser;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
// Replace with new log4j 2: import org.apache.logging.log4j.Level;
|
||||
import org.dspace.content.Collection;
|
||||
import org.dspace.content.DCDate;
|
||||
import org.dspace.content.Item;
|
||||
@@ -316,7 +316,7 @@ public class SubscribeCLITool {
|
||||
boolean test = line.hasOption("t");
|
||||
|
||||
if (test) {
|
||||
log.setLevel(Level.DEBUG);
|
||||
//TODO Replace with log4j2: org.apache.logging.log4j.core.config.Configurator.setLevel();
|
||||
}
|
||||
|
||||
Context context = null;
|
||||
|
@@ -43,7 +43,8 @@ public class VersionedHandleIdentifierProviderWithCanonicalHandles extends Ident
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(VersionedHandleIdentifierProviderWithCanonicalHandles.class);
|
||||
private static Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(VersionedHandleIdentifierProviderWithCanonicalHandles.class);
|
||||
|
||||
/**
|
||||
* Prefix registered to no one
|
||||
|
@@ -57,7 +57,8 @@ public class SimpleDSORelationsConverterPlugin
|
||||
public static final String SIMPLE_RELATIONS_ITEM2BITSTREAM_KEY = "rdf.simplerelations.item2bitstream";
|
||||
|
||||
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SimpleDSORelationsConverterPlugin.class);
|
||||
private static final Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(SimpleDSORelationsConverterPlugin.class);
|
||||
|
||||
@Autowired(required = true)
|
||||
protected BitstreamService bitstreamService;
|
||||
|
@@ -27,7 +27,8 @@ public class V6_0_2016_01_26__DS_2188_Remove_DBMS_Browse_Tables implements JdbcM
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(V6_0_2016_01_26__DS_2188_Remove_DBMS_Browse_Tables.class);
|
||||
private static final Logger log =
|
||||
org.apache.logging.log4j.LogManager.getLogger(V6_0_2016_01_26__DS_2188_Remove_DBMS_Browse_Tables.class);
|
||||
|
||||
/* The checksum to report for this migration (when successful) */
|
||||
private int checksum = -1;
|
||||
|
@@ -22,6 +22,7 @@ import gr.ekt.bte.core.Record;
|
||||
import gr.ekt.bte.core.RecordSet;
|
||||
import gr.ekt.bte.core.Value;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.app.util.DCInput;
|
||||
import org.dspace.app.util.DCInputSet;
|
||||
@@ -49,8 +50,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class DSpaceWorkspaceItemOutputGenerator implements OutputGenerator {
|
||||
|
||||
private static Logger log = Logger
|
||||
.getLogger(DSpaceWorkspaceItemOutputGenerator.class);
|
||||
private static Logger log = LogManager.getLogger(DSpaceWorkspaceItemOutputGenerator.class);
|
||||
|
||||
protected Context context;
|
||||
|
||||
|
@@ -21,6 +21,7 @@ import gr.ekt.bte.core.RecordSet;
|
||||
import gr.ekt.bte.core.StringValue;
|
||||
import gr.ekt.bte.dataloader.FileDataLoader;
|
||||
import gr.ekt.bte.exceptions.MalformedSourceException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.core.Context;
|
||||
|
||||
@@ -32,8 +33,7 @@ import org.dspace.core.Context;
|
||||
*/
|
||||
public class MultipleSubmissionLookupDataLoader implements DataLoader {
|
||||
|
||||
private static Logger log = Logger
|
||||
.getLogger(MultipleSubmissionLookupDataLoader.class);
|
||||
private static Logger log = LogManager.getLogger(MultipleSubmissionLookupDataLoader.class);
|
||||
|
||||
protected final String NOT_FOUND_DOI = "NOT-FOUND-DOI";
|
||||
|
||||
|
@@ -15,6 +15,7 @@ import gr.ekt.bte.core.DataLoadingSpec;
|
||||
import gr.ekt.bte.core.Record;
|
||||
import gr.ekt.bte.core.RecordSet;
|
||||
import gr.ekt.bte.exceptions.MalformedSourceException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.submit.util.ItemSubmissionLookupDTO;
|
||||
|
||||
@@ -29,8 +30,7 @@ public class SubmissionItemDataLoader implements DataLoader {
|
||||
|
||||
List<DataLoader> providers;
|
||||
|
||||
private static Logger log = Logger
|
||||
.getLogger(SubmissionItemDataLoader.class);
|
||||
private static Logger log = LogManager.getLogger(SubmissionItemDataLoader.class);
|
||||
|
||||
public SubmissionItemDataLoader() {
|
||||
dtoList = null;
|
||||
|
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
package org.dspace.submit.step;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.InProgressSubmission;
|
||||
import org.dspace.core.Context;
|
||||
@@ -16,8 +17,7 @@ public class StartSubmissionLookupStep extends AbstractProcessingStep {
|
||||
/**
|
||||
* log4j logger
|
||||
*/
|
||||
private static Logger log = Logger
|
||||
.getLogger(StartSubmissionLookupStep.class);
|
||||
private static Logger log = LogManager.getLogger(StartSubmissionLookupStep.class);
|
||||
|
||||
@Override
|
||||
public void doPreProcessing(Context context, InProgressSubmission wsi) {
|
||||
|
@@ -23,8 +23,7 @@ public class LoggerUsageEventListener extends AbstractUsageEventListener {
|
||||
/**
|
||||
* log4j category
|
||||
*/
|
||||
private static Logger log = Logger
|
||||
.getLogger(LoggerUsageEventListener.class);
|
||||
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(LoggerUsageEventListener.class);
|
||||
|
||||
@Override
|
||||
public void receiveEvent(Event event) {
|
||||
|
@@ -10,6 +10,7 @@ package org.dspace.sword;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dspace.content.Community;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
@@ -19,8 +20,7 @@ import org.dspace.content.service.CommunityService;
|
||||
import org.purl.sword.base.Collection;
|
||||
|
||||
public class CommunityCollectionGenerator extends ATOMCollectionGenerator {
|
||||
private static Logger log = Logger
|
||||
.getLogger(CommunityCollectionGenerator.class);
|
||||
private static Logger log = LogManager.getLogger(CommunityCollectionGenerator.class);
|
||||
|
||||
protected CommunityService communityService = ContentServiceFactory
|
||||
.getInstance().getCommunityService();
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
package org.purl.sword.client;
|
||||
|
||||
import org.apache.logging.log4j.PropertyConfigurator;
|
||||
// Replace with log4j 2: import org.apache.logging.log4j.PropertyConfigurator;
|
||||
|
||||
/**
|
||||
* Entry point for the SWORD Demonstration Client. This will parse the list of
|
||||
@@ -24,8 +24,8 @@ public class ClientFactory {
|
||||
// configure the logger from the property file. The GUI client will
|
||||
// reload these properties if it is set to capture the output and
|
||||
// display it in a panel.
|
||||
PropertyConfigurator.configure(this.getClass().getClassLoader()
|
||||
.getResource(ClientConstants.LOGGING_PROPERTY_FILE));
|
||||
// Replace with log4j 2: PropertyConfigurator.configure(this.getClass()
|
||||
// .getClassLoader().getResource(ClientConstants.LOGGING_PROPERTY_FILE));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user