-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathProxyLog.cs
More file actions
34 lines (28 loc) · 822 Bytes
/
ProxyLog.cs
File metadata and controls
34 lines (28 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.IO.Compression;
using Common;
using FieldDataPluginFramework;
namespace MultiFile
{
class ProxyLog : ILog
{
public static ProxyLog Create(ILog log, IFieldDataPlugin plugin, ZipArchiveEntry entry)
{
return new ProxyLog(log, plugin, entry);
}
private ILog Log { get; }
public string Prefix { get; }
private ProxyLog(ILog log, IFieldDataPlugin plugin, ZipArchiveEntry entry)
{
Log = log;
Prefix = $"{PluginLoader.GetPluginNameAndVersion(plugin)} - '{entry.FullName}'";
}
public void Info(string message)
{
Log.Info($"{Prefix}: {message}");
}
public void Error(string message)
{
Log.Error($"{Prefix}: {message}");
}
}
}