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);
}