/[RomCheater]/trunk/RomCheater.Logging/LoggingConstants.cs
ViewVC logotype

Diff of /trunk/RomCheater.Logging/LoggingConstants.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.Logging/LoggingConstants.cs	2014/09/17 00:31:37	879
+++ trunk/RomCheater.Logging/LoggingConstants.cs	2014/09/17 00:36:21	880
@@ -21,6 +21,20 @@
             catch (Exception) { try { AppName = Assembly.GetCallingAssembly().GetName().Name; } 
             catch (Exception) { try { AppName = Assembly.GetExecutingAssembly().GetName().Name; } 
             catch (Exception) { AppName = DEFAULT_APP_NAME; } } }
+            
+            AppLogFile = string.Format("{0}.log", AppName);
+            AppFullLogPath = string.Format(@"{0}\{1}", Application.StartupPath, AppLogFile);
+
+            try { AppVersion = Assembly.GetEntryAssembly().GetName().Version.ToString(); }
+            catch (Exception)
+            {
+                try { AppVersion = Assembly.GetCallingAssembly().GetName().Version.ToString(); }
+                catch (Exception)
+                {
+                    try { AppVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
+                    catch (Exception) { AppVersion = new Version(0, 0, 0, 0).ToString(); }
+                }
+            }
         }
         #region Application Constants
         private const string DEFAULT_APP_NAME = "RomCheater";

 

  ViewVC Help
Powered by ViewVC 1.1.22