Blockcore.Features.Diagnostic.DiagnosticSettings.DiagnosticSettings C# (CSharp) Method

DiagnosticSettings() public method

Initializes an instance of the object from the node configuration.
public DiagnosticSettings ( NodeSettings nodeSettings ) : System.Text
nodeSettings NodeSettings The node configuration.
return System.Text
        public DiagnosticSettings(NodeSettings nodeSettings)
        {
            Guard.NotNull(nodeSettings, nameof(nodeSettings));

            this.logger = nodeSettings.LoggerFactory.CreateLogger(this.GetType().FullName);

            TextFileConfiguration config = nodeSettings.ConfigReader;

            this.PeersStatisticsCollectorEnabled = config.GetOrDefault("diagpeerstats", DefaultPeersStatisticsCollectorEnabled, this.logger);
            this.MaxPeerLoggedEvents = config.GetOrDefault("diagpeerstatsmaxlog", DefaultMaxPeerLoggedEvents, this.logger);
        }