mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Logger] Remove padding insanity
This commit is contained in:
@@ -137,10 +137,7 @@ namespace SabreTools.Helper
|
|||||||
// USER and ERROR writes to console
|
// USER and ERROR writes to console
|
||||||
if (loglevel == LogLevel.USER || loglevel == LogLevel.ERROR)
|
if (loglevel == LogLevel.USER || loglevel == LogLevel.ERROR)
|
||||||
{
|
{
|
||||||
int padlength = (int)(Math.Ceiling((double)output.Length / 80) * 80);
|
Console.WriteLine((loglevel == LogLevel.ERROR ? loglevel.ToString() + " " : "") + output);
|
||||||
padlength = (padlength > 0 ? padlength: 0);
|
|
||||||
string tempoutput = output.PadRight(padlength, ' ');
|
|
||||||
Console.WriteLine((loglevel == LogLevel.ERROR ? loglevel.ToString() + " " : "") + tempoutput);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're writing to file, use the existing stream
|
// If we're writing to file, use the existing stream
|
||||||
@@ -178,10 +175,7 @@ namespace SabreTools.Helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write out to the console
|
// Write out to the console
|
||||||
int padlength = (int)(Math.Ceiling((double)output.Length / 80) * 80) - 1;
|
Console.Write(output);
|
||||||
padlength = (padlength > 0 ? padlength : 0);
|
|
||||||
string tempoutput = output.PadRight(padlength, ' ');
|
|
||||||
Console.Write(tempoutput);
|
|
||||||
|
|
||||||
// If we're writing to file, use the existing stream
|
// If we're writing to file, use the existing stream
|
||||||
if (_tofile)
|
if (_tofile)
|
||||||
|
|||||||
Reference in New Issue
Block a user