mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 21:54:26 -04:00
Write JSON directly to logfile
Can't be worse than serializing to a string, concatenating and converting to utf8, right?
This commit is contained in:
parent
6fb6b5f176
commit
e9ae2d6a1e
@ -492,12 +492,11 @@ public sealed class TranscodeManager : ITranscodeManager, IDisposable
|
|||||||
IODefaults.FileStreamBufferSize,
|
IODefaults.FileStreamBufferSize,
|
||||||
FileOptions.Asynchronous);
|
FileOptions.Asynchronous);
|
||||||
|
|
||||||
var commandLineLogMessage = process.StartInfo.FileName + " " + process.StartInfo.Arguments;
|
await JsonSerializer.SerializeAsync(logStream, state.MediaSource, cancellationToken: cancellationTokenSource.Token).ConfigureAwait(false);
|
||||||
var commandLineLogMessageBytes = Encoding.UTF8.GetBytes(
|
var commandLineLogMessageBytes = Encoding.UTF8.GetBytes(
|
||||||
JsonSerializer.Serialize(state.MediaSource)
|
Environment.NewLine
|
||||||
+ Environment.NewLine
|
+ Environment.NewLine
|
||||||
+ Environment.NewLine
|
+ process.StartInfo.FileName + " " + process.StartInfo.Arguments
|
||||||
+ commandLineLogMessage
|
|
||||||
+ Environment.NewLine
|
+ Environment.NewLine
|
||||||
+ Environment.NewLine);
|
+ Environment.NewLine);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user