mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Debug logging message, custom script
This commit is contained in:
@@ -37,6 +37,7 @@ namespace VRCX
|
||||
private Thread m_Thread;
|
||||
private bool m_ResetLog;
|
||||
private bool m_FirstRun = true;
|
||||
private bool m_NullLogMsg;
|
||||
private static DateTime tillDate = DateTime.Now;
|
||||
|
||||
// NOTE
|
||||
@@ -94,7 +95,7 @@ namespace VRCX
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
catch(ThreadInterruptedException)
|
||||
catch (ThreadInterruptedException)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -128,8 +129,10 @@ namespace VRCX
|
||||
// sort by creation time
|
||||
Array.Sort(fileInfos, (a, b) => a.CreationTimeUtc.CompareTo(b.CreationTimeUtc));
|
||||
|
||||
var index = 0;
|
||||
foreach (var fileInfo in fileInfos)
|
||||
{
|
||||
index++;
|
||||
fileInfo.Refresh();
|
||||
if (fileInfo.Exists == false)
|
||||
{
|
||||
@@ -151,6 +154,17 @@ namespace VRCX
|
||||
m_LogContextMap.Add(fileInfo.Name, logContext);
|
||||
}
|
||||
|
||||
if (!m_NullLogMsg && fileInfo.Length == 0 && index == fileInfos.Length)
|
||||
{
|
||||
// check if last file is empty
|
||||
Console.WriteLine($"{fileInfo.Name}");
|
||||
if (MainForm.Instance != null && MainForm.Instance.Browser != null)
|
||||
{
|
||||
MainForm.Instance.Browser.ExecuteScriptAsync("$app.showNullLogWarning()");
|
||||
m_NullLogMsg = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (logContext.Length == fileInfo.Length)
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user