improve logging
This commit is contained in:
parent
a28b56f481
commit
ee31cf06d4
1 changed files with 13 additions and 7 deletions
|
@ -34,17 +34,23 @@ namespace EnvyUpdate
|
|||
|
||||
private void chkLog_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Debug.isVerbose = true;
|
||||
Debug.LogToFile("------");
|
||||
Debug.LogToFile("INFO Enabled logging to file. Restart Application to see full startup log.");
|
||||
if (!Debug.isVerbose)
|
||||
{
|
||||
Debug.isVerbose = true;
|
||||
Debug.LogToFile("------");
|
||||
Debug.LogToFile("INFO Enabled logging to file. Restart Application to see full startup log.");
|
||||
}
|
||||
}
|
||||
|
||||
private void chkLog_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Debug.LogToFile("INFO Disabled logging to file.");
|
||||
if (File.Exists(Path.Combine(GlobalVars.exedirectory, "envyupdate.log")))
|
||||
File.Move(Path.Combine(GlobalVars.exedirectory, "envyupdate.log"), Path.Combine(GlobalVars.exedirectory, "envyupdate." + DateTime.Now.ToString("yyyyMMdd-HHmmss") + ".log"));
|
||||
Debug.isVerbose = false;
|
||||
if (Debug.isVerbose)
|
||||
{
|
||||
Debug.LogToFile("INFO Disabled logging to file.");
|
||||
if (File.Exists(Path.Combine(GlobalVars.exedirectory, "envyupdate.log")))
|
||||
File.Move(Path.Combine(GlobalVars.exedirectory, "envyupdate.log"), Path.Combine(GlobalVars.exedirectory, "envyupdate." + DateTime.Now.ToString("yyyyMMdd-HHmmss") + ".log"));
|
||||
Debug.isVerbose = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue