Improved logging.
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PluginManager.Interfaces.Exceptions;
|
||||
|
||||
public interface IException
|
||||
{
|
||||
public List<string> Messages { get; set; }
|
||||
public bool isFatal { get; }
|
||||
public string GenerateFullMessage();
|
||||
public void HandleException();
|
||||
|
||||
public IException AppendError(string message);
|
||||
|
||||
public IException AppendError(List<string> messages);
|
||||
public IException IsFatal(bool isFatal = true);
|
||||
|
||||
}
|
||||
15
PluginManager/Interfaces/Logger/ILog.cs
Normal file
15
PluginManager/Interfaces/Logger/ILog.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using PluginManager.Others;
|
||||
|
||||
namespace PluginManager.Interfaces.Logger;
|
||||
|
||||
internal interface ILog
|
||||
{
|
||||
string Message { get; set; }
|
||||
string OutputFile { get; set; }
|
||||
|
||||
Type? Source { get; set; }
|
||||
|
||||
LogType Type { get; set; }
|
||||
DateTime ThrowTime { get; set; }
|
||||
}
|
||||
17
PluginManager/Interfaces/Logger/ILogger.cs
Normal file
17
PluginManager/Interfaces/Logger/ILogger.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using PluginManager.Others;
|
||||
using PluginManager.Others.Logger;
|
||||
|
||||
namespace PluginManager.Interfaces.Logger;
|
||||
|
||||
internal interface ILogger
|
||||
{
|
||||
bool IsEnabled { get; init; }
|
||||
bool OutputToFile { get; init; }
|
||||
|
||||
event EventHandler<Log> OnLog;
|
||||
Task Log(
|
||||
string message = "", string outputFile = "", Type? source = default, LogType type = LogType.INFO,
|
||||
DateTime throwTime = default);
|
||||
}
|
||||
Reference in New Issue
Block a user