From 6a751251e7b9fa3ab42f8bdc4cfc79e434031321 Mon Sep 17 00:00:00 2001 From: artiume Date: Thu, 19 Nov 2020 19:45:26 -0500 Subject: [PATCH] Update Jellyfin.Api/Helpers/TranscodingJobHelper.cs Co-authored-by: Cody Robibero --- Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index 6d46eff404..889518879e 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -553,7 +553,9 @@ namespace Jellyfin.Api.Helpers : "FFmpeg.DirectStream-"; } - var logFilePath = Path.Combine(_serverConfigurationManager.ApplicationPaths.LogDirectoryPath, logFilePrefix + DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss", CultureInfo.InvariantCulture) + "_" + state.Request.MediaSourceId + "_" + Guid.NewGuid().ToString("N").Substring(0, 8) + ".log"); + var logFilePath = Path.Combine( + _serverConfigurationManager.ApplicationPaths.LogDirectoryPath, + $"{logFilePrefix}{DateTime.Now:yyyy-MM-dd_HH-mm-ss}_{state.Request.MediaSourceId}_{Guid.NewGuid().ToString()[..8]}.log"); // FFmpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory. Stream logStream = new FileStream(logFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, true);