-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update iroiro * support multi-version for misskey instance * 🚀 * add Misq project (fork)
- Loading branch information
Showing
25 changed files
with
817 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.IO; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LegatoNowPlaying | ||
{ | ||
public static class ErrorLogger | ||
{ | ||
public static async Task LogException(Exception ex, bool isInnerException = false) | ||
{ | ||
using (var log = new StreamWriter("errors.log", true, Encoding.UTF8)) | ||
{ | ||
if (!isInnerException) | ||
{ | ||
await log.WriteLineAsync("------------------------------"); | ||
await log.WriteLineAsync(""); | ||
await log.WriteLineAsync("# Exception"); | ||
await log.WriteLineAsync($"{DateTime.Now.ToShortDateString()} {DateTime.Now.ToShortTimeString()}"); | ||
} | ||
else | ||
{ | ||
await log.WriteLineAsync("# Inner Exception"); | ||
} | ||
|
||
await log.WriteLineAsync(""); | ||
await log.WriteLineAsync($"[Message] {ex.Message}"); | ||
await log.WriteLineAsync("[StackTrace]"); | ||
await log.WriteLineAsync($"{ex.StackTrace}"); | ||
await log.WriteLineAsync(""); | ||
} | ||
|
||
if (ex.InnerException != null) | ||
{ | ||
await LogException(ex.InnerException, true); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.