update WithLogLevel to accept params string[]

This commit is contained in:
Eric 2023-09-14 15:03:09 +10:00
parent 5f9371e95e
commit f765933efa
No known key found for this signature in database
2 changed files with 20 additions and 0 deletions

View File

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

View File

@ -9,6 +9,12 @@ namespace DistTestCore
{
ICodexSetup WithName(string name);
ICodexSetup At(Location location);
ICodexSetup WithLogLevel(CodexLogLevel level);
/// <summary>
/// Sets the log level for codex. The default level is INFO and the
/// log level is applied only to the supplied topics.
/// </summary>
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;