|
@ -56,6 +56,11 @@ namespace IPA.Logging |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
None = 0, |
|
|
None = 0, |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A trace message. These are ignored *incredibly* early.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Trace = 32, |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// A debug message.
|
|
|
/// A debug message.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
@ -98,6 +103,8 @@ namespace IPA.Logging |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
None = Level.None, |
|
|
None = Level.None, |
|
|
|
|
|
|
|
|
|
|
|
TraceOnly = Level.Trace, |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Only shows Debug messages.
|
|
|
/// Only shows Debug messages.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
@ -148,10 +155,15 @@ namespace IPA.Logging |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
InfoUp = InfoOnly | NoticeUp, |
|
|
InfoUp = InfoOnly | NoticeUp, |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Shows all messages debug and up.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
DebugUp = DebugOnly | InfoUp, |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Shows all messages.
|
|
|
/// Shows all messages.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
All = DebugOnly | InfoUp, |
|
|
|
|
|
|
|
|
All = TraceOnly | DebugUp, |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Used for when the level is undefined.
|
|
|
/// Used for when the level is undefined.
|
|
@ -173,6 +185,22 @@ namespace IPA.Logging |
|
|
/// <param name="e">the exception to log</param>
|
|
|
/// <param name="e">the exception to log</param>
|
|
|
public virtual void Log(Level level, Exception e) => Log(level, e.ToString()); |
|
|
public virtual void Log(Level level, Exception e) => Log(level, e.ToString()); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Sends a trace message.
|
|
|
|
|
|
/// Equivalent to `Log(Level.Trace, message);`
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <seealso cref="Log(Level, string)"/>
|
|
|
|
|
|
/// <param name="message">the message to log</param>
|
|
|
|
|
|
public virtual void Trace(string message) => Log(Level.Trace, message); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Sends an exception as a trace message.
|
|
|
|
|
|
/// Equivalent to `Log(Level.Trace, e);`
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <seealso cref="Log(Level, Exception)"/>
|
|
|
|
|
|
/// <param name="e">the exception to log</param>
|
|
|
|
|
|
public virtual void Trace(Exception e) => Log(Level.Trace, e); |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Sends a debug message.
|
|
|
/// Sends a debug message.
|
|
|
/// Equivalent to `Log(Level.Debug, message);`
|
|
|
/// Equivalent to `Log(Level.Debug, message);`
|
|
|