@@ -13,21 +13,18 @@ public class SynapseNodeConfig
1313 {
1414 public SynapseNodeConfig ( )
1515 {
16- Log4NetConversionPattern = "%d{ISO8601}|%-5p|(%t)|%m%n" ;
17- SerializeResultPlan = true ;
18- ValidatePlanSignature = true ;
1916 }
2017
2118 public static readonly string CurrentPath = $ "{ Path . GetDirectoryName ( typeof ( SynapseNodeConfig ) . Assembly . Location ) } ";
2219 public static readonly string FileName = $ "{ Path . GetDirectoryName ( typeof ( SynapseNodeConfig ) . Assembly . Location ) } \\ Synapse.Node.config.yaml";
2320
24- public int MaxServerThreads { get ; set ; }
25- public string AuditLogRootPath { get ; set ; }
26- public string ServiceLogRootPath { get ; set ; }
27- public string Log4NetConversionPattern { get ; set ; }
28- public bool SerializeResultPlan { get ; set ; }
29- public bool ValidatePlanSignature { get ; set ; }
30- public string ControllerServiceUrl { get ; set ; }
21+ public int MaxServerThreads { get ; set ; } = 10 ;
22+ public string AuditLogRootPath { get ; set ; } = @".\Logs" ;
23+ public string ServiceLogRootPath { get ; set ; } = @".\Logs" ;
24+ public string Log4NetConversionPattern { get ; set ; } = "%d{ISO8601}|%-5p|(%t)|%m%n" ;
25+ public bool SerializeResultPlan { get ; set ; } = true ;
26+ public bool ValidatePlanSignature { get ; set ; } = true ;
27+ public string ControllerServiceUrl { get ; set ; } = "http://localhost:8008/synapse/execute" ;
3128 public string WebApiPort { get ; set ; } = "8000" ;
3229
3330 public string GetResolvedAuditLogRootPath ( )
@@ -84,6 +81,9 @@ public void Serialize()
8481
8582 public static SynapseNodeConfig Deserialze ( )
8683 {
84+ if ( ! File . Exists ( FileName ) )
85+ new SynapseNodeConfig ( ) . Serialize ( ) ;
86+
8787 return YamlHelpers . DeserializeFile < SynapseNodeConfig > ( FileName ) ;
8888 }
8989 }
0 commit comments