Merge pull request #2834 from MediaBrowser/dev

update logging
This commit is contained in:
Luke 2017-08-19 18:54:24 -04:00 committed by GitHub
commit ead257c392

View File

@ -134,18 +134,11 @@ namespace Emby.Server.Implementations.Logging
{ {
try try
{ {
var any = false;
foreach (var message in _queue.GetConsumingEnumerable()) foreach (var message in _queue.GetConsumingEnumerable())
{ {
var bytes = Encoding.UTF8.GetBytes(message + Environment.NewLine); var bytes = Encoding.UTF8.GetBytes(message + Environment.NewLine);
_fileStream.Write(bytes, 0, bytes.Length); _fileStream.Write(bytes, 0, bytes.Length);
any = true;
}
if (any)
{
_fileStream.Flush(true); _fileStream.Flush(true);
} }
} }