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.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/Ryujinx.Common/Logging/Targets/FileLogTarget.cs b/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
index 85dc8249..4db5f7bc 100644
--- a/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
+++ b/Ryujinx.Common/Logging/Targets/FileLogTarget.cs
@@ -1,4 +1,5 @@
-using System.IO;
+using System;
+using System.IO;
using System.Text;
namespace Ryujinx.Common.Logging
@@ -9,13 +10,17 @@ namespace Ryujinx.Common.Logging
private readonly StreamWriter _logWriter;
private readonly ILogFormatter _formatter;
+ private readonly string _name;
- public FileLogTarget(string path)
- : this(path, FileShare.Read, FileMode.Append)
+ string ILogTarget.Name { get => _name; }
+
+ public FileLogTarget(string path, string name)
+ : this(path, name, FileShare.Read, FileMode.Append)
{ }
- public FileLogTarget(string path, FileShare fileShare, FileMode fileMode)
+ public FileLogTarget(string path, string name, FileShare fileShare, FileMode fileMode)
{
+ _name = name;
_logWriter = new StreamWriter(File.Open(path, fileMode, FileAccess.Write, fileShare));
_formatter = new DefaultLogFormatter();
}