|
1 |
| -using System.IO; |
| 1 | +using System.Collections.Generic; |
| 2 | +using System.IO; |
| 3 | +using System.Reflection; |
2 | 4 | using Infralution.Localization.Wpf;
|
3 | 5 | using NLog;
|
| 6 | +using NLog.Fluent; |
4 | 7 | using Rubberduck.Common;
|
5 | 8 | using Rubberduck.Parsing;
|
6 | 9 | using Rubberduck.Parsing.Symbols;
|
@@ -145,6 +148,7 @@ private void UpdateLoggingLevel()
|
145 | 148 | public void Startup()
|
146 | 149 | {
|
147 | 150 | EnsureLogFolderPathExists();
|
| 151 | + LogRubberduckSart(); |
148 | 152 | LoadConfig();
|
149 | 153 | CheckForLegacyIndenterSettings();
|
150 | 154 | _appMenus.Initialize();
|
@@ -223,6 +227,21 @@ private void CheckForLegacyIndenterSettings()
|
223 | 227 | }
|
224 | 228 | }
|
225 | 229 |
|
| 230 | + private void LogRubberduckSart() |
| 231 | + { |
| 232 | + var version = GetType().Assembly.GetName().Version.ToString(); |
| 233 | + GlobalDiagnosticsContext.Set("RubberduckVersion", version); |
| 234 | + var headers = new List<string> |
| 235 | + { |
| 236 | + string.Format("Rubberduck version {0} loading:", version), |
| 237 | + string.Format("\tOperating System: {0} {1}", Environment.OSVersion.VersionString, Environment.Is64BitOperatingSystem ? "x64" : "x86"), |
| 238 | + string.Format("\tHost Product: {0} {1}", Application.ProductName, Environment.Is64BitProcess ? "x64" : "x86"), |
| 239 | + string.Format("\tHost Version: {0}", Application.ProductVersion), |
| 240 | + string.Format("\tHost Executable: {0}", Path.GetFileName(Application.ExecutablePath)), |
| 241 | + }; |
| 242 | + Logger.Log(LogLevel.Info, string.Join(Environment.NewLine, headers)); |
| 243 | + } |
| 244 | + |
226 | 245 | private bool _disposed;
|
227 | 246 | public void Dispose()
|
228 | 247 | {
|
|
0 commit comments