Zusätzliche logs eingefügt

This commit is contained in:
2026-04-22 13:07:01 +02:00
parent f7a9113a57
commit e7fb09069c
3 changed files with 9 additions and 2 deletions

View File

@@ -38,6 +38,9 @@ public class FileProcessingResource {
@POST
@Produces(MediaType.APPLICATION_JSON)
public Response triggerProcessing(@HeaderParam("X-Api-Key") String apiKey) {
//Log.infof("API-key correct: %s", config.api().key());
//Log.infof("API-key received: %s", apiKey);
if (apiKey == null || !config.api().key().equals(apiKey)) {
Log.warn("Trigger abgelehnt — ungültiger oder fehlender API-Key");
return Response.status(Response.Status.UNAUTHORIZED).build();

View File

@@ -33,6 +33,7 @@ public class OciUploadService {
@PostConstruct
void init() {
Log.info("Initialisiere OCI ObjectStorage-Client...");
SimpleAuthenticationDetailsProvider auth = SimpleAuthenticationDetailsProvider.builder()
.tenantId(config.tenancyId())
.userId(config.userId())
@@ -48,6 +49,7 @@ public class OciUploadService {
})
.build();
Log.info("Authentifizierung...");
this.client = ObjectStorageClient.builder().build(auth);
Log.infof("OCI ObjectStorage-Client initialisiert (Region: %s, Bucket: %s)", config.region(), config.bucket());
}
@@ -61,11 +63,12 @@ public class OciUploadService {
* @throws OciException bei Verbindungs- oder Upload-Fehlern
*/
public void upload(ProcessingContext context) throws OciException {
Log.info("OCI Upload gestartet.");
List<FileEntry> files = context.extractedFiles.stream()
.filter(e -> !e.isMarker)
.toList();
Log.infof("OCI-Upload gestartet: %d Datei(en) für '%s'", files.size(), context.zipNameWithoutExt);
Log.infof("OCI-Upload: %d Datei(en) für '%s'", files.size(), context.zipNameWithoutExt);
for (FileEntry entry : files) {
String key = buildKey(context.zipNameWithoutExt, entry.relativePath);

View File

@@ -125,6 +125,7 @@ public class FileProcessingPipeline {
// --- OCI Upload ---
MDC.put("step", "oci-upload");
context.status = ProcessingStatus.PARTIALLY_UPLOADED;
Log.info("Starte OCI-Upload");
ociUploadService.upload(context);
context.status = ProcessingStatus.MARKER_UPLOADED;