mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Remove some old logging classes
This commit is contained in:
parent
6e55d8c362
commit
e2f1d74ae5
5 changed files with 0 additions and 91 deletions
|
@ -1,9 +0,0 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace LibHac.Fs
|
||||
{
|
||||
public interface IAccessLog
|
||||
{
|
||||
void Log(Result result, System.TimeSpan startTime, System.TimeSpan endTime, int handleId, string message, [CallerMemberName] string caller = "");
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
using System;
|
||||
using LibHac.FsSrv;
|
||||
|
||||
namespace LibHac.Fs
|
||||
{
|
||||
/// <summary>
|
||||
/// The default access logger that will output to the SD card via <see cref="FileSystemProxyImpl"/>.
|
||||
/// </summary>
|
||||
public class SdCardAccessLog : IAccessLog
|
||||
{
|
||||
public void Log(Result result, System.TimeSpan startTime, System.TimeSpan endTime, int handleId, string message, string caller = "")
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
namespace LibHac
|
||||
{
|
||||
public interface ITimeSpanGenerator
|
||||
{
|
||||
System.TimeSpan GetCurrent();
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace LibHac
|
||||
{
|
||||
public class StopWatchTimeSpanGenerator : ITimeSpanGenerator
|
||||
{
|
||||
private Stopwatch Timer = Stopwatch.StartNew();
|
||||
|
||||
public System.TimeSpan GetCurrent()
|
||||
{
|
||||
return Timer.Elapsed;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LibHac;
|
||||
using LibHac.Fs;
|
||||
|
||||
namespace hactoolnet
|
||||
{
|
||||
public class ConsoleAccessLog : IAccessLog
|
||||
{
|
||||
public void Log(Result result, System.TimeSpan startTime, System.TimeSpan endTime, int handleId, string message, [CallerMemberName] string caller = "")
|
||||
{
|
||||
Console.WriteLine(AccessLogHelpers.BuildDefaultLogLine(result, startTime, endTime, handleId, message, caller));
|
||||
}
|
||||
}
|
||||
|
||||
public class ProgressReportAccessLog : IAccessLog
|
||||
{
|
||||
private IProgressReport Logger { get; }
|
||||
public ProgressReportAccessLog(IProgressReport logger)
|
||||
{
|
||||
Logger = logger;
|
||||
}
|
||||
|
||||
public void Log(Result result, System.TimeSpan startTime, System.TimeSpan endTime, int handleId, string message, [CallerMemberName] string caller = "")
|
||||
{
|
||||
Logger.LogMessage(AccessLogHelpers.BuildDefaultLogLine(result, startTime, endTime, handleId, message, caller));
|
||||
}
|
||||
}
|
||||
|
||||
public class TextWriterAccessLog : IAccessLog
|
||||
{
|
||||
private TextWriter Logger { get; }
|
||||
|
||||
public TextWriterAccessLog(TextWriter logger)
|
||||
{
|
||||
Logger = logger;
|
||||
}
|
||||
|
||||
public void Log(Result result, System.TimeSpan startTime, System.TimeSpan endTime, int handleId, string message, [CallerMemberName] string caller = "")
|
||||
{
|
||||
Logger.WriteLine(AccessLogHelpers.BuildDefaultLogLine(result, startTime, endTime, handleId, message, caller));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue