From f765933efa410f73999cb045352b5f0f0fe1c44c Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Thu, 14 Sep 2023 15:03:09 +1000 Subject: [PATCH] update WithLogLevel to accept params string[] --- DistTestCore/Codex/CodexStartupConfig.cs | 1 + DistTestCore/CodexSetup.cs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/DistTestCore/Codex/CodexStartupConfig.cs b/DistTestCore/Codex/CodexStartupConfig.cs index a1170c6..f02dca7 100644 --- a/DistTestCore/Codex/CodexStartupConfig.cs +++ b/DistTestCore/Codex/CodexStartupConfig.cs @@ -15,6 +15,7 @@ namespace DistTestCore.Codex public string? NameOverride { get; set; } public Location Location { get; set; } public CodexLogLevel LogLevel { get; set; } + public string[]? LogTopics { get; set; } public ByteSize? StorageQuota { get; set; } public MetricsMode MetricsMode { get; set; } public MarketplaceInitialConfig? MarketplaceConfig { get; set; } diff --git a/DistTestCore/CodexSetup.cs b/DistTestCore/CodexSetup.cs index c91b66f..3dbc1d0 100644 --- a/DistTestCore/CodexSetup.cs +++ b/DistTestCore/CodexSetup.cs @@ -9,6 +9,12 @@ namespace DistTestCore { ICodexSetup WithName(string name); ICodexSetup At(Location location); + ICodexSetup WithLogLevel(CodexLogLevel level); + /// + /// Sets the log level for codex. The default level is INFO and the + /// log level is applied only to the supplied topics. + /// + ICodexSetup WithLogLevel(CodexLogLevel level, params string[] topics); ICodexSetup WithBootstrapNode(IOnlineCodexNode node); ICodexSetup WithStorageQuota(ByteSize storageQuota); ICodexSetup WithBlockTTL(TimeSpan duration); @@ -56,6 +62,19 @@ namespace DistTestCore return this; } + public ICodexSetup WithLogLevel(CodexLogLevel level) + { + LogLevel = level; + return this; + } + + public ICodexSetup WithLogLevel(CodexLogLevel level, params string[] topics) + { + LogLevel = level; + LogTopics = topics; + return this; + } + public ICodexSetup WithStorageQuota(ByteSize storageQuota) { StorageQuota = storageQuota;