Updates api. sets marketplace-infra log level

This commit is contained in:
ThatBen 2025-03-03 15:46:43 +01:00
parent 5c56e4796f
commit 789852bf1a
No known key found for this signature in database
GPG Key ID: 62C543548433D43E
4 changed files with 13 additions and 2 deletions

View File

@ -325,6 +325,7 @@ components:
- unknown
error:
type: string
nullable: true
description: If Request failed, then here is presented the error message
request:
$ref: "#/components/schemas/StorageRequest"

View File

@ -10,7 +10,7 @@ namespace CodexPlugin
public class ApiChecker
{
// <INSERT-OPENAPI-YAML-HASH>
private const string OpenApiYamlHash = "69-7C-8A-AC-87-6E-E2-D1-C4-C2-7B-C7-79-6F-15-03-38-5B-18-3D-40-7D-33-A6-62-7B-33-55-0A-4D-64-8B";
private const string OpenApiYamlHash = "00-7D-C3-0B-D2-23-D6-6C-CA-C2-43-D0-9B-B4-63-FC-4F-FE-23-9F-B8-82-5F-3B-3F-6B-4F-1F-11-E9-48-16";
private const string OpenApiFilePath = "/codex/openapi.yaml";
private const string DisableEnvironmentVariable = "CODEXPLUGIN_DISABLE_APICHECK";

View File

@ -54,6 +54,7 @@ namespace CodexPlugin
public CodexLogLevel ContractClock { get; set; } = CodexLogLevel.Warn;
public CodexLogLevel? BlockExchange { get; }
public CodexLogLevel JsonSerialize { get; set; } = CodexLogLevel.Warn;
public CodexLogLevel MarketplaceInfra { get; set; } = CodexLogLevel.Warn;
}
public class CodexSetup : CodexStartupConfig, ICodexSetup

View File

@ -30,6 +30,7 @@ namespace CodexPlugin
{
"discv5",
"providers",
"routingtable",
"manager",
"cache",
};
@ -80,12 +81,20 @@ namespace CodexPlugin
"json",
"serialization"
};
var marketplaceInfraTopics = new[]
{
"JSONRPC-WS-CLIENT",
"JSONRPC-HTTP-CLIENT",
"codex",
"repostore"
};
level = $"{level};" +
$"{CustomTopics.DiscV5.ToString()!.ToLowerInvariant()}:{string.Join(",", discV5Topics)};" +
$"{CustomTopics.Libp2p.ToString()!.ToLowerInvariant()}:{string.Join(",", libp2pTopics)};" +
$"{CustomTopics.ContractClock.ToString().ToLowerInvariant()}:{string.Join(",", contractClockTopics)};" +
$"{CustomTopics.JsonSerialize.ToString().ToLowerInvariant()}:{string.Join(",", jsonSerializeTopics)}";
$"{CustomTopics.JsonSerialize.ToString().ToLowerInvariant()}:{string.Join(",", jsonSerializeTopics)};" +
$"{CustomTopics.MarketplaceInfra.ToString().ToLowerInvariant()}:{string.Join(",", marketplaceInfraTopics)}";
if (CustomTopics.BlockExchange != null)
{