|
@@ -1,4 +1,5 @@
|
|
|
using System.Collections.Generic;
|
|
|
+using System.Diagnostics;
|
|
|
using System.Linq;
|
|
|
using WingServerCommon.Config.Parameters;
|
|
|
|
|
@@ -15,24 +16,24 @@ namespace WingServerCommon.Config
|
|
|
/// </summary>
|
|
|
/// <value></value>
|
|
|
public static string Host { get; private set; }
|
|
|
-
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// Indicates the server will be deployed as distributed system
|
|
|
/// </summary>
|
|
|
/// <value></value>
|
|
|
- public static bool IsDistributed {get;set;}
|
|
|
+ public static bool IsDistributed { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Indicates the server is master
|
|
|
/// </summary>
|
|
|
/// <value></value>
|
|
|
- public static bool IsMaster {get;set;}
|
|
|
-
|
|
|
+ public static bool IsMaster { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// The master server url
|
|
|
/// </summary>
|
|
|
/// <value></value>
|
|
|
- public static string MasterUrl {get;set;}
|
|
|
+ public static string MasterUrl { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Log settings from configuration file
|
|
@@ -138,7 +139,9 @@ namespace WingServerCommon.Config
|
|
|
|
|
|
//TODO load log settings
|
|
|
var debugMode = ConfigurationManager.GetParammeter<BoolParameter>("Log", "Debug").Value;
|
|
|
- LogSettings = new LogSettings(debugMode);
|
|
|
+ var traceLevelString = ConfigurationManager.GetParammeter<StringParameter>("Log", "Level").Value;
|
|
|
+ Enum.TryParse(traceLevelString, true, out TraceLevel traceLevel);
|
|
|
+ LogSettings = new LogSettings(debugMode, traceLevel);
|
|
|
LoadRemedicalConfig();
|
|
|
LoadStorageConfig();
|
|
|
//TODO others
|