Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
Issue #177
  • Loading branch information
rsoika committed Jun 10, 2023
1 parent dbe1b4f commit 2bc2a62
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ public class ExportApi extends Application {
public static final String ENV_EXPORT_FTP_PORT = "EXPORT_FTP_PORT";
public static final String ENV_EXPORT_FTP_USER = "EXPORT_FTP_USER";
public static final String ENV_EXPORT_FTP_PASSWORD = "EXPORT_FTP_PASSWORD";
public static final String ENV_EXPORT_FILE_PATH = "EXPORT_FILE_PATH";

public static final String EVENTLOG_TOPIC_EXPORT = "snapshot.export";
public static final String EVENTLOG_TOPIC_EXPORT = "file.export";
public static final String EXPORT_SYNC_DEADLOCK = "export.sync.deadlock";

public static final String TOPIC_EXPORT = "EXPORT";

public final static String SNAPSHOT_RESOURCE = "snapshot/";

/**
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.imixs.archive.export;
package org.imixs.archive.export.controller;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.SortedMap;
Expand All @@ -12,7 +13,10 @@
import org.eclipse.microprofile.metrics.MetricID;
import org.eclipse.microprofile.metrics.MetricRegistry;
import org.eclipse.microprofile.metrics.annotation.RegistryType;
import org.imixs.archive.util.LogController;
import org.imixs.archive.export.ExportApi;
import org.imixs.archive.export.ExportException;
import org.imixs.archive.export.services.ExportService;
import org.imixs.archive.export.services.ExportStatusHandler;

import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Inject;
Expand Down Expand Up @@ -70,10 +74,6 @@ public class ExportController implements Serializable {

@Inject
ExportService exportService;

@Inject
LogController logController;

@Inject
ExportStatusHandler exportStatusHandler;

Expand Down Expand Up @@ -126,7 +126,7 @@ public void start() {
try {
exportService.startScheduler(true);
} catch (ExportException e) {
logController.warning(ExportApi.TOPIC_EXPORT, e.getMessage());
exportService.warning(ExportApi.EVENTLOG_TOPIC_EXPORT, e.getMessage());
}
}

Expand All @@ -137,7 +137,7 @@ public void stop() {
try {
exportService.stopScheduler();
} catch (ExportException e) {
logController.warning(ExportApi.TOPIC_EXPORT, e.getMessage());
exportService.warning(ExportApi.EVENTLOG_TOPIC_EXPORT, e.getMessage());
}
}

Expand All @@ -162,4 +162,7 @@ public long getCounterByName(String name) {
return 0;
}

public List<String> getLogEntries(String context) {
return exportService.getLogEntries();// logTopics.get(context);
}
}
Loading

0 comments on commit 2bc2a62

Please sign in to comment.