ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.Logging/LoggingConstants.cs
Revision: 876
Committed: Wed Sep 17 00:29:07 2014 UTC (9 years, 2 months ago) by william
File size: 1556 byte(s)
Log Message:
+ update to determining log name

File Contents

# Content
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Reflection;
6 using RomCheater.UserSettingsSupport;
7 using RomCheater.Logging.Properties;
8 using System.Windows.Forms;
9
10 namespace RomCheater.Logging
11 {
12 public static class LoggingConstants
13 {
14 //private static SettingSubscriber SettingsSubscriber;
15 static LoggingConstants()
16 {
17 //SettingsSubscriber = new SettingSubscriber();
18 //SettingsSubscriber.AddSubscriber(Settings.Default);
19 //Logging.Properties.Settings.Default;
20 try { AppName = Assembly.GetEntryAssembly().GetName().Name; }
21 catch (Exception) { try { AppName = Assembly.GetCallingAssembly().GetName().Name; }
22 catch (Exception) { try { AppName = Assembly.GetExecutingAssembly().GetName().Name; }
23 catch (Exception) { AppName = DEFAULT_APP_NAME; } } }
24 }
25 #region Application Constants
26 private const string DEFAULT_APP_NAME = "RomCheater";
27 public static string AppName = DEFAULT_APP_NAME;
28 public static string AppLogFile = string.Format("{0}.log", AppName);
29 public static string AppFullLogPath = string.Format(@"{0}\{1}", Application.StartupPath, AppLogFile);
30 public static string AppVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
31 #if DEBUG
32 public const string AppBuild = "Debug";
33 #else
34 public const string AppBuild = "Release";
35 #endif
36 #endregion
37 }
38 }