ArchiBoT/ASF code unification

This commit is contained in:
JustArchi
2018-06-10 00:57:19 +02:00
parent 232c994711
commit 8b822e4064

View File

@@ -52,7 +52,7 @@ namespace ArchiSteamFarm {
// Otherwise, we ran into fatal exception before logging module could even get initialized, so activate fallback logging that involves file and console
string message = string.Format(DateTime.Now + " " + Strings.ErrorEarlyFatalExceptionInfo + Environment.NewLine, SharedInfo.Version);
string message = string.Format(DateTime.Now + " " + Strings.ErrorEarlyFatalExceptionInfo, SharedInfo.Version) + Environment.NewLine;
try {
await RuntimeCompatibility.File.WriteAllTextAsync(SharedInfo.LogFile, message).ConfigureAwait(false);
@@ -61,13 +61,13 @@ namespace ArchiSteamFarm {
}
try {
Console.WriteLine(message);
Console.Write(message);
} catch {
// Ignored, we can't do anything with this
}
while (true) {
message = string.Format(Strings.ErrorEarlyFatalExceptionPrint, previousMethodName, exception.Message, exception.StackTrace);
message = string.Format(Strings.ErrorEarlyFatalExceptionPrint, previousMethodName, exception.Message, exception.StackTrace) + Environment.NewLine;
try {
await RuntimeCompatibility.File.AppendAllTextAsync(SharedInfo.LogFile, message).ConfigureAwait(false);
@@ -76,7 +76,7 @@ namespace ArchiSteamFarm {
}
try {
Console.WriteLine(message);
Console.Write(message);
} catch {
// Ignored, we can't do anything with this
}