aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Common/Logging/Targets/FileLogTarget.cs')
-rw-r--r--Ryujinx.Common/Logging/Targets/FileLogTarget.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.Common/Logging/Targets/FileLogTarget.cs b/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
index 46fffd3a..5591c60b 100644
--- a/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
+++ b/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
@@ -1,14 +1,12 @@
using System;
using System.IO;
using System.Linq;
-using System.Text;
+using System.Reflection;
namespace Ryujinx.Common.Logging
{
public class FileLogTarget : ILogTarget
{
- private static readonly ObjectPool<StringBuilder> _stringBuilderPool = SharedPools.Default<StringBuilder>();
-
private readonly StreamWriter _logWriter;
private readonly ILogFormatter _formatter;
private readonly string _name;
@@ -32,8 +30,10 @@ namespace Ryujinx.Common.Logging
files[i].Delete();
}
+ string version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
+
// Get path for the current time
- path = Path.Combine(logDir.FullName, $"Ryujinx_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.log");
+ path = Path.Combine(logDir.FullName, $"Ryujinx_{version}_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.log");
_name = name;
_logWriter = new StreamWriter(File.Open(path, fileMode, FileAccess.Write, fileShare));