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

PrintHelp() public static method

Prints the help information on how to configure the Diagnostic Feature to the logger.
public static PrintHelp ( Network network ) : void
network Network The network to use.
return void
        public static void PrintHelp(Network network)
        {
            var builder = new StringBuilder();

            builder.AppendLine($"**DIAGNOSTIC SETTINGS**");
            builder.AppendLine($"-diagpeerstats=<bool>             Start the diagnostic peer statistics collector. Defaults to {DefaultPeersStatisticsCollectorEnabled}.");
            builder.AppendLine($"-diagpeerstatsmaxlog=<number>     Maximum number of logged peer events stored during the diagnostic peer statistics collector. Defaults to {DefaultMaxPeerLoggedEvents}.");
            builder.AppendLine($"**END OF DIAGNOSTIC SETTINGS**");

            NodeSettings.Default(network).Logger.LogInformation(builder.ToString());
        }
    }

Usage Example

Example #1
0
 /// <summary>
 /// Prints command-line help.
 /// </summary>
 /// <param name="network">The network to extract values from.</param>
 public static void PrintHelp(Network network)
 {
     DiagnosticSettings.PrintHelp(network);
 }