mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 08:28:39 +00:00
Cleanup code
This commit is contained in:
parent
2005c64379
commit
2085e5a8ca
4 changed files with 15 additions and 13 deletions
|
@ -20,7 +20,7 @@ namespace LBPUnion.ProjectLighthouse.Logging {
|
|||
LogLevel.Error => LoggerLevelAspNetError.Instance,
|
||||
LogLevel.Critical => LoggerLevelAspNetCritical.Instance,
|
||||
LogLevel.None => LoggerLevelAspNetNone.Instance,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null)
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null),
|
||||
};
|
||||
|
||||
Logger.Log(state.ToString(), loggerLevel);
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace LBPUnion.ProjectLighthouse.Logging {
|
|||
[ProviderAlias("Kettu")]
|
||||
public class AspNetToKettuLoggerProvider : ILoggerProvider, IDisposable {
|
||||
public void Dispose() {
|
||||
// cry about it
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public ILogger CreateLogger(string categoryName) {
|
||||
|
|
|
@ -3,53 +3,53 @@ using Kettu;
|
|||
namespace LBPUnion.ProjectLighthouse.Logging {
|
||||
public class LoggerLevelStartup : LoggerLevel {
|
||||
public override string Name => "Startup";
|
||||
public static LoggerLevelStartup Instance = new();
|
||||
public static readonly LoggerLevelStartup Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelDatabase : LoggerLevel {
|
||||
public override string Name => "Database";
|
||||
public static LoggerLevelDatabase Instance = new();
|
||||
public static readonly LoggerLevelDatabase Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelHttp : LoggerLevel {
|
||||
public override string Name => "HTTP";
|
||||
public static LoggerLevelHttp Instance = new();
|
||||
public static readonly LoggerLevelHttp Instance = new();
|
||||
}
|
||||
|
||||
#region ASP.NET
|
||||
public class LoggerLevelAspNetTrace : LoggerLevel {
|
||||
public override string Name => "ASP.NET: Trace";
|
||||
public static LoggerLevelAspNetTrace Instance = new();
|
||||
public static readonly LoggerLevelAspNetTrace Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelAspNetDebug : LoggerLevel {
|
||||
public override string Name => "ASP.NET: Debug";
|
||||
public static LoggerLevelAspNetDebug Instance = new();
|
||||
public static readonly LoggerLevelAspNetDebug Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelAspNetInformation : LoggerLevel {
|
||||
public override string Name => "ASP.NET: Information";
|
||||
public static LoggerLevelAspNetInformation Instance = new();
|
||||
public static readonly LoggerLevelAspNetInformation Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelAspNetWarning : LoggerLevel {
|
||||
public override string Name => "ASP.NET: Warning";
|
||||
public static LoggerLevelAspNetWarning Instance = new();
|
||||
public static readonly LoggerLevelAspNetWarning Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelAspNetError : LoggerLevel {
|
||||
public override string Name => "ASP.NET: Error";
|
||||
public static LoggerLevelAspNetError Instance = new();
|
||||
public static readonly LoggerLevelAspNetError Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelAspNetCritical : LoggerLevel {
|
||||
public override string Name => "ASP.NET: Critical";
|
||||
public static LoggerLevelAspNetCritical Instance = new();
|
||||
public static readonly LoggerLevelAspNetCritical Instance = new();
|
||||
}
|
||||
|
||||
public class LoggerLevelAspNetNone : LoggerLevel {
|
||||
public override string Name => "ASP.NET: None";
|
||||
public static LoggerLevelAspNetNone Instance = new();
|
||||
public static readonly LoggerLevelAspNetNone Instance = new();
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -6,6 +6,8 @@ namespace LBPUnion.ProjectLighthouse.Logging {
|
|||
|
||||
private NullScope() {}
|
||||
|
||||
public void Dispose() {}
|
||||
public void Dispose() {
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue