Skip to content

Commit

Permalink
log files root fix IQSS#10373
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMeierUIT committed Mar 25, 2024
1 parent 463e8bb commit b4b9acf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ public void init(FilterConfig filterConfig) throws ServletException {
logger.info(AuthFilter.class.getName() + "initialized. filterConfig.getServletContext().getServerInfo(): " + filterConfig.getServletContext().getServerInfo());

try {
String glassfishLogsDirectory = "logs";

FileHandler logFile = new FileHandler(".." + File.separator + glassfishLogsDirectory + File.separator + "authfilter.log");
FileHandler logFile = new FileHandler( System.getProperty("com.sun.aas.instanceRoot") + File.separator + "logs" + File.separator + "authfilter.log");
SimpleFormatter formatterTxt = new SimpleFormatter();
logFile.setFormatter(formatterTxt);
logger.addHandler(logFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public class HarvesterServiceBean {
public static final String HARVEST_RESULT_FAILED="failed";
public static final String DATAVERSE_PROPRIETARY_METADATA_FORMAT="dataverse_json";
public static final String DATAVERSE_PROPRIETARY_METADATA_API="/api/datasets/export?exporter="+DATAVERSE_PROPRIETARY_METADATA_FORMAT+"&persistentId=";
public static final String DATAVERSE_HARVEST_STOP_FILE="../logs/stopharvest_";

public HarvesterServiceBean() {

Expand Down Expand Up @@ -399,7 +398,7 @@ private void deleteHarvestedDatasetIfExists(String persistentIdentifier, Dataver

private boolean checkIfStoppingJob(HarvestingClient harvestingClient) {
Long pid = ProcessHandle.current().pid();
String stopFileName = DATAVERSE_HARVEST_STOP_FILE + harvestingClient.getName() + "." + pid;
String stopFileName = System.getProperty("com.sun.aas.instanceRoot") + File.separator + "logs" + File.separator + "stopharvest_" + harvestingClient.getName() + "." + pid;
Path stopFilePath = Paths.get(stopFileName);

if (Files.exists(stopFilePath)) {
Expand Down

0 comments on commit b4b9acf

Please sign in to comment.