Encoding fix for System Logs. (#4564)
This commit is contained in:
parent
054adf6379
commit
4c291da45c
|
@ -49,7 +49,7 @@ namespace Emby.Dlna.Service
|
|||
{
|
||||
ControlRequestInfo requestInfo = null;
|
||||
|
||||
using (var streamReader = new StreamReader(request.InputXml))
|
||||
using (var streamReader = new StreamReader(request.InputXml, Encoding.UTF8))
|
||||
{
|
||||
var readerSettings = new XmlReaderSettings()
|
||||
{
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace Jellyfin.Api.Controllers
|
|||
// For older files, assume fully static
|
||||
var fileShare = file.LastWriteTimeUtc < DateTime.UtcNow.AddHours(-1) ? FileShare.Read : FileShare.ReadWrite;
|
||||
FileStream stream = new FileStream(file.FullName, FileMode.Open, FileAccess.Read, fileShare);
|
||||
return File(stream, "text/plain");
|
||||
return File(stream, "text/plain; charset=utf-8");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -598,7 +598,8 @@ namespace Jellyfin.Server
|
|||
.WriteTo.Async(x => x.File(
|
||||
Path.Combine(appPaths.LogDirectoryPath, "log_.log"),
|
||||
rollingInterval: RollingInterval.Day,
|
||||
outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}"))
|
||||
outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}",
|
||||
encoding: Encoding.UTF8))
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithThreadId()
|
||||
.CreateLogger();
|
||||
|
|
Loading…
Reference in New Issue
Block a user