Remove line numbers from log
This commit is contained in:
parent
b2668e659c
commit
ecf02f525f
1 changed files with 35 additions and 54 deletions
|
@ -70,7 +70,7 @@ namespace Ryujinx.Core
|
||||||
}
|
}
|
||||||
|
|
||||||
string Text = $"{LogEntry.ExecutionTime} | {LogEntry.LogLevel.ToString()} > " +
|
string Text = $"{LogEntry.ExecutionTime} | {LogEntry.LogLevel.ToString()} > " +
|
||||||
$"{LogEntry.CallingMember}:{LogEntry.CallingLineNumber} > {LogEntry.Message}";
|
$"{LogEntry.CallingMember} > {LogEntry.Message}";
|
||||||
|
|
||||||
Console.ForegroundColor = consoleColor;
|
Console.ForegroundColor = consoleColor;
|
||||||
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
Console.WriteLine(Text.PadLeft(Text.Length + 1, ' '));
|
||||||
|
@ -90,15 +90,12 @@ namespace Ryujinx.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Info(string Message,
|
public static void Info(string Message, [CallerMemberName] string CallingMember = "")
|
||||||
[CallerMemberName] string CallingMember = "",
|
|
||||||
[CallerLineNumber] int CallingLineNumber = 0)
|
|
||||||
{
|
{
|
||||||
if (EnableInfo)
|
if (EnableInfo)
|
||||||
{
|
{
|
||||||
LogMessage(new LogEntry
|
LogMessage(new LogEntry
|
||||||
{
|
{
|
||||||
CallingLineNumber = CallingLineNumber,
|
|
||||||
CallingMember = CallingMember,
|
CallingMember = CallingMember,
|
||||||
LogLevel = LogLevel.Info,
|
LogLevel = LogLevel.Info,
|
||||||
Message = Message,
|
Message = Message,
|
||||||
|
@ -107,15 +104,12 @@ namespace Ryujinx.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Trace(string Message,
|
public static void Trace(string Message, [CallerMemberName] string CallingMember = "")
|
||||||
[CallerMemberName] string CallingMember = "",
|
|
||||||
[CallerLineNumber] int CallingLineNumber = 0)
|
|
||||||
{
|
{
|
||||||
if (EnableTrace)
|
if (EnableTrace)
|
||||||
{
|
{
|
||||||
LogMessage(new LogEntry
|
LogMessage(new LogEntry
|
||||||
{
|
{
|
||||||
CallingLineNumber = CallingLineNumber,
|
|
||||||
CallingMember = CallingMember,
|
CallingMember = CallingMember,
|
||||||
LogLevel = LogLevel.Trace,
|
LogLevel = LogLevel.Trace,
|
||||||
Message = Message,
|
Message = Message,
|
||||||
|
@ -124,15 +118,12 @@ namespace Ryujinx.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Debug(string Message,
|
public static void Debug(string Message, [CallerMemberName] string CallingMember = "")
|
||||||
[CallerMemberName] string CallingMember = "",
|
|
||||||
[CallerLineNumber] int CallingLineNumber = 0)
|
|
||||||
{
|
{
|
||||||
if (EnableDebug)
|
if (EnableDebug)
|
||||||
{
|
{
|
||||||
LogMessage(new LogEntry
|
LogMessage(new LogEntry
|
||||||
{
|
{
|
||||||
CallingLineNumber = CallingLineNumber,
|
|
||||||
CallingMember = CallingMember,
|
CallingMember = CallingMember,
|
||||||
LogLevel = LogLevel.Debug,
|
LogLevel = LogLevel.Debug,
|
||||||
Message = Message,
|
Message = Message,
|
||||||
|
@ -141,15 +132,12 @@ namespace Ryujinx.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Warn(string Message,
|
public static void Warn(string Message, [CallerMemberName] string CallingMember = "")
|
||||||
[CallerMemberName] string CallingMember = "",
|
|
||||||
[CallerLineNumber] int CallingLineNumber = 0)
|
|
||||||
{
|
{
|
||||||
if (EnableWarn)
|
if (EnableWarn)
|
||||||
{
|
{
|
||||||
LogMessage(new LogEntry
|
LogMessage(new LogEntry
|
||||||
{
|
{
|
||||||
CallingLineNumber = CallingLineNumber,
|
|
||||||
CallingMember = CallingMember,
|
CallingMember = CallingMember,
|
||||||
LogLevel = LogLevel.Warn,
|
LogLevel = LogLevel.Warn,
|
||||||
Message = Message,
|
Message = Message,
|
||||||
|
@ -158,15 +146,12 @@ namespace Ryujinx.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Error(string Message,
|
public static void Error(string Message, [CallerMemberName] string CallingMember = "")
|
||||||
[CallerMemberName] string CallingMember = "",
|
|
||||||
[CallerLineNumber] int CallingLineNumber = 0)
|
|
||||||
{
|
{
|
||||||
if (EnableError)
|
if (EnableError)
|
||||||
{
|
{
|
||||||
LogMessage(new LogEntry
|
LogMessage(new LogEntry
|
||||||
{
|
{
|
||||||
CallingLineNumber = CallingLineNumber,
|
|
||||||
CallingMember = CallingMember,
|
CallingMember = CallingMember,
|
||||||
LogLevel = LogLevel.Error,
|
LogLevel = LogLevel.Error,
|
||||||
Message = Message,
|
Message = Message,
|
||||||
|
@ -175,15 +160,12 @@ namespace Ryujinx.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Fatal(string Message,
|
public static void Fatal(string Message, [CallerMemberName] string CallingMember = "")
|
||||||
[CallerMemberName] string CallingMember = "",
|
|
||||||
[CallerLineNumber] int CallingLineNumber = 0)
|
|
||||||
{
|
{
|
||||||
if (EnableFatal)
|
if (EnableFatal)
|
||||||
{
|
{
|
||||||
LogMessage(new LogEntry
|
LogMessage(new LogEntry
|
||||||
{
|
{
|
||||||
CallingLineNumber = CallingLineNumber,
|
|
||||||
CallingMember = CallingMember,
|
CallingMember = CallingMember,
|
||||||
LogLevel = LogLevel.Fatal,
|
LogLevel = LogLevel.Fatal,
|
||||||
Message = Message,
|
Message = Message,
|
||||||
|
@ -271,7 +253,6 @@ namespace Ryujinx.Core
|
||||||
public string CallingMember;
|
public string CallingMember;
|
||||||
public string ExecutionTime;
|
public string ExecutionTime;
|
||||||
public string Message;
|
public string Message;
|
||||||
public int CallingLineNumber;
|
|
||||||
public LogLevel LogLevel;
|
public LogLevel LogLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue