updates for #201 - right to master

This commit is contained in:
dovholuknf
2020-11-26 01:57:10 -05:00
parent 4a7bfcc40b
commit c58e8a56e8
4 changed files with 39 additions and 6 deletions
-4
View File
@@ -824,9 +824,5 @@ namespace ZitiDesktopEdge {
ServiceStatusEvent resp = await monitorClient.CaptureLogsAsync();
logger.Info("response: {0}", resp.Message);
}
private void Button_Click(object sender, RoutedEventArgs e) {
}
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ $now=(Get-Date).ToString('yyyy-MM-dd_HHmmss')
$logroot="${env:ProgramFiles(x86)}\NetFoundry, Inc\Ziti Desktop Edge\logs"
$ipinfo="${logroot}\ipconfig.info.txt"
$logdest="$logroot\ziti-service\$now"
$logdest="$logroot\ziti-service\"
$logdest
$logsrc="C:\Windows\System32\config\systemprofile\AppData\Roaming\NetFoundry\*.log"
$destArchive="${logroot}\logs-${now}.zip"
+37
View File
@@ -56,6 +56,40 @@ namespace ZitiUpdateService {
}
private string GetLogs() {
/*
string logLocation = Path.Combine(exeLocation, "logs");
string destinationLocation = Path.Combine(exeLocation, "temp");
string serviceLogsLocation = Path.Combine(Environment.GetEnvironmentVariable("APPDATA"), "NetFoundry");
string serviceLogsDest = Path.Combine(destinationLocation, "services");
Logger.Debug("removing temp folder: {0}", destinationLocation);
try {
Directory.Delete(destinationLocation, true);
} catch(Exception ex) {
//means it doesn't exist
}
Directory.CreateDirectory(destinationLocation);
Logger.Debug("copying all directories from: {0}", logLocation);
foreach (string dirPath in Directory.GetDirectories(logLocation, "*", SearchOption.AllDirectories)) {
Directory.CreateDirectory(dirPath.Replace(logLocation, destinationLocation));
}
Logger.Debug("copying all non-zip files from: {0}", logLocation);
foreach (string newPath in Directory.GetFiles(logLocation, "*.*", SearchOption.AllDirectories)) {
if (!newPath.EndsWith(".zip")) {
File.Copy(newPath, newPath.Replace(logLocation, destinationLocation), true);
}
}
Logger.Debug("copying service files from: {0} to {1}", serviceLogsLocation, serviceLogsDest);
Directory.CreateDirectory(serviceLogsDest);
foreach (string newPath in Directory.GetFiles(serviceLogsLocation, "ziti-tunnel.*", SearchOption.AllDirectories)) {
File.Copy(newPath, newPath.Replace(serviceLogsLocation, serviceLogsDest), true);
}*/
Logger.Info("Request to collect logs received");
var ps = System.Management.Automation.PowerShell.Create();
string script = Path.Combine(exeLocation, "collect-logs.ps1");
@@ -90,9 +124,12 @@ namespace ZitiUpdateService {
addLogsFolder(Path.Combine(logs, "ZitiMonitorService"));
addLogsFolder(Path.Combine(logs, "service"));
Logger.Info("starting ipc server");
ipcServer = svr.startIpcServer();
Logger.Info("starting events server");
eventServer = svr.startEventsServer();
Logger.Info("starting service watchers");
if (!running) {
running = true;
Task.Run(() => {
+1 -1
View File
@@ -1,7 +1,7 @@
# Release 1.5.10
## What's New
* none - bugfix only
* fixes [#201](https://github.com/openziti/desktop-edge-win/issues/201) - Feedback menu item will collect all logs
## Other changes:
* none