public void HandleShowLogs() { string loggingPath = CommonApplicationDataPath.GetFolderWithinCommonApplicationData("Logging", true); var explorerWindowProcess = new Process { StartInfo = { FileName = "explorer.exe", Arguments = "/select,\"" + loggingPath + "\"" } }; explorerWindowProcess.Start(); }
protected override Window CreateShell() { string loggingPath = CommonApplicationDataPath.GetFolderWithinCommonApplicationData("Logging", true); var template = "{Level:u4} {Timestamp:yyyy-MM-dd HH:mm:ss.ffffff} {SourceContext} {Message} {Exception}{NewLine}"; Log.Logger = new LoggerConfiguration() .WriteTo.Console() .WriteTo.File(loggingPath, outputTemplate: template, restrictedToMinimumLevel: LogEventLevel.Verbose, rollingInterval: RollingInterval.Day, buffered: false) .CreateLogger(); Log.Information("App.xaml - Creating the shell"); return(Container.Resolve <MainWindow>()); }