forked from RobertoVDMeer/Basic-Panic-System
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogger.cs
More file actions
45 lines (40 loc) · 1.11 KB
/
Logger.cs
File metadata and controls
45 lines (40 loc) · 1.11 KB
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
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.IO;
using Harmony;
using static PanicSystem.PanicSystem;
// ReSharper disable ClassNeverInstantiated.Global
namespace PanicSystem
{
public class Logger
{
private static string LogFilePath => Path.Combine(modDirectory, "log.txt");
public static void LogReport(object line)
{
if (modSettings.CombatLog)
{
using (var writer = new StreamWriter(LogFilePath, true))
{
writer.WriteLine($"{line}");
}
}
}
internal static void LogDebug(object input)
{
/*if (modSettings.CombatLog)
{
try
{
using (var writer = new StreamWriter(LogFilePath, true))
{
writer.WriteLine($" {input ?? "null"}");
}
}
catch (Exception ) { }
}*/
if (modSettings.Debug)
{
FileLog.Log($"[PanicSystem] {input ?? "null"}");
}
}
}
}