add a couple of extra lines to make it easy to find when the service/ui starts

This commit is contained in:
dovholuknf
2020-11-27 14:45:08 -05:00
parent 861c3445ec
commit d0bc162f69
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -66,8 +66,10 @@ namespace ZitiDesktopEdge {
var curdir = Path.GetDirectoryName(asm.Location);
string nlogFile = Path.Combine(curdir, logname + "-log.config");
bool byFile = false;
if (File.Exists(nlogFile)) {
LogManager.Configuration = new XmlLoggingConfiguration(nlogFile);
byFile = true;
} else {
var config = new LoggingConfiguration();
// Targets where to log to: File and Console
@@ -87,7 +89,8 @@ namespace ZitiDesktopEdge {
// Apply config
LogManager.Configuration = config;
}
logger.Info("service started - logger initialized");
logger.Info("============================== UI started ==============================");
logger.Info("logger initialized using file? {0}", byFile);
App.Current.MainWindow.WindowState = WindowState.Normal;
App.Current.MainWindow.Closing += MainWindow_Closing;