From 07a2e63941d7a200723372c105f13e1812c6f9e1 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 27 Apr 2023 20:09:23 +1000 Subject: [PATCH] more http logging to subdirectory of temp --- .../src/main/java/org/hl7/fhir/utilities/SimpleHTTPClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SimpleHTTPClient.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SimpleHTTPClient.java index 95cb1bba6..39c6ef877 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SimpleHTTPClient.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/SimpleHTTPClient.java @@ -72,10 +72,11 @@ public class SimpleHTTPClient { public void checkThrowException() throws IOException { if (code >= 300) { - String filename = Utilities.path("[tmp]", "fhir-http-"+(++counter)+".log"); + String filename = Utilities.path("[tmp]", "http-log", "fhir-http-"+(++counter)+".log"); if (content == null || content.length == 0) { throw new IOException("Invalid HTTP response "+code+" from "+source+" ("+message+") (no content)"); } else { + Utilities.createDirectory(Utilities.path("[tmp]", "http-log")); TextFile.bytesToFile(content, filename); throw new IOException("Invalid HTTP response "+code+" from "+source+" ("+message+") (content in "+filename+")"); }