diff --git a/common/src/main/java/ctbrec/recorder/download/hls/AbstractHlsDownload.java b/common/src/main/java/ctbrec/recorder/download/hls/AbstractHlsDownload.java index d0499308..c5f52eab 100644 --- a/common/src/main/java/ctbrec/recorder/download/hls/AbstractHlsDownload.java +++ b/common/src/main/java/ctbrec/recorder/download/hls/AbstractHlsDownload.java @@ -358,7 +358,7 @@ public abstract class AbstractHlsDownload extends AbstractDownload { if (nextSegmentNumber > 0 && playlist.seq > nextSegmentNumber) { recordingEvents.add(RecordingEvent.of("Missed segments: "+nextSegmentNumber+" < " + playlist.seq)); if (config.getSettings().logMissedSegments) { - File hlsEventsFile = File.createTempFile("/tmp/rec_evt_" + Instant.now() + "_" + model.getSanitizedNamed(), ".log"); + File hlsEventsFile = File.createTempFile("rec_evt_" + Instant.now() + "_" + model.getSanitizedNamed(), ".log"); try (OutputStream outputStream = Files.newOutputStream(hlsEventsFile.toPath(), CREATE, WRITE, TRUNCATE_EXISTING)) { BufferedWriter br = new BufferedWriter(new OutputStreamWriter(outputStream)); DateTimeFormatter dtf = DateTimeFormatter.ISO_LOCAL_TIME; @@ -369,7 +369,7 @@ public abstract class AbstractHlsDownload extends AbstractDownload { } br.flush(); } catch (IOException e) { - e.printStackTrace(); + LOG.error("Couldn't write log file for missed segments", e); } } }