Move logger
This commit is contained in:
parent
cdeef7279c
commit
72aff78718
@ -76,13 +76,11 @@ namespace RageCoop.Client
|
|||||||
#if !NON_INTERACTIVE
|
#if !NON_INTERACTIVE
|
||||||
CoopMenu.DisconnectedMenuSetting();
|
CoopMenu.DisconnectedMenuSetting();
|
||||||
#endif
|
#endif
|
||||||
|
Main.Logger.Info($">> Disconnected << reason: {reason}");
|
||||||
Main.QueueAction(() =>
|
Main.QueueAction(() =>
|
||||||
GTA.UI.Notification.Show("~r~Disconnected: " + reason));
|
GTA.UI.Notification.Show("~r~Disconnected: " + reason));
|
||||||
|
Main.Resources.Unload();
|
||||||
Main.Resources.Unload();
|
|
||||||
Main.Logger.Info($">> Disconnected << reason: {reason}");
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -238,6 +238,21 @@ namespace RageCoop.Client
|
|||||||
File.WriteAllLines("ScriptHookVDotNet.ini",lineList.ToArray());
|
File.WriteAllLines("ScriptHookVDotNet.ini",lineList.ToArray());
|
||||||
}
|
}
|
||||||
Keys key = (Keys)Enum.Parse(typeof(Keys), reloadKey, true);
|
Keys key = (Keys)Enum.Parse(typeof(Keys), reloadKey, true);
|
||||||
|
|
||||||
|
// Move log file so it doesn't get deleted
|
||||||
|
Main.Logger.Dispose();
|
||||||
|
|
||||||
|
var path = Main.Logger.LogPath+".last.log";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (File.Exists(path)) { File.Delete(path); }
|
||||||
|
File.Move(Main.Logger.LogPath, path);
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
GTA.UI.Notification.Show(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
PostMessage(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle, WM_KEYDOWN, (int)key, 0);
|
PostMessage(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle, WM_KEYDOWN, (int)key, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user