diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 60a3994..0fddcdb 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -776,7 +776,6 @@ public void error( final SAXParseException exception ) throws SAXException { fail( "While validating element " + elString + ": " + e ); } } - } /** @@ -801,6 +800,7 @@ public FileLoggingConnectionStreamFactory( final String logDir ) { @Override public InputStream makeInputStream( final URLConnection conn ) throws IOException { InputStream inputStream = conn.getInputStream(); + String baseURLhostname = conn.getURL().getHost(); if ( logDir != null ) { final Path logDirPath = Paths.get( logDir ); Files.createDirectories( logDirPath ); @@ -816,10 +816,9 @@ public InputStream makeInputStream( final URLConnection conn ) throws IOExceptio sb.append( m2.group( 1 ) ); } final DateTimeFormatter dtf = DateTimeFormatter.ofPattern( "yyyyMMdd'T'HHmmss.SSS" ); - final String logFilename = "oai-pmh--" + dtf.format( LocalDateTime.now() ) + "--" + sb.toString() + ".xml"; + final String logFilename = baseURLhostname + "_oai-pmh--" + dtf.format( LocalDateTime.now() ) + "--" + sb.toString() + ".xml"; inputStream = new FileSavingInputStream( inputStream, logDirPath.resolve( logFilename ) ); } return inputStream; } - } \ No newline at end of file