File tree Expand file tree Collapse file tree 5 files changed +31
-17
lines changed
Expand file tree Collapse file tree 5 files changed +31
-17
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2025 The Silkworm Authors
2+ // SPDX-License-Identifier: Apache-2.0
3+
4+ #ifndef SILKWORM_CAPI_LOG_LEVEL_H_
5+ #define SILKWORM_CAPI_LOG_LEVEL_H_
6+
7+ #if __cplusplus
8+ extern "C" {
9+ #endif
10+
11+ //! Silkworm library logging level
12+ //! \note using anonymous C99 enum is the most portable way to pass enum in Cgo
13+ typedef enum { // NOLINT(performance-enum-size)
14+ SILKWORM_LOG_NONE ,
15+ SILKWORM_LOG_CRITICAL ,
16+ SILKWORM_LOG_ERROR ,
17+ SILKWORM_LOG_WARNING ,
18+ SILKWORM_LOG_INFO ,
19+ SILKWORM_LOG_DEBUG ,
20+ SILKWORM_LOG_TRACE
21+ } SilkwormLogLevel ;
22+
23+ #if __cplusplus
24+ }
25+ #endif
26+
27+ #endif // SILKWORM_CAPI_LOG_LEVEL_H_
Original file line number Diff line number Diff line change 11// Copyright 2025 The Silkworm Authors
22// SPDX-License-Identifier: Apache-2.0
33
4- #include " common .hpp"
4+ #include " make_log_settings .hpp"
55
66#include < cstring>
77
Original file line number Diff line number Diff line change 33
44#pragma once
55
6- #include < filesystem>
7-
86#include < silkworm/infra/common/log.hpp>
97
10- #include " silkworm .h"
8+ #include " log_level .h"
119
1210// ! Build log configuration matching Erigon log format w/ custom verbosity level
1311silkworm::log::Settings make_log_settings (SilkwormLogLevel c_log_level);
Original file line number Diff line number Diff line change 4444#include < silkworm/rpc/ethbackend/remote_backend.hpp>
4545#include < silkworm/rpc/ethdb/kv/backend_providers.hpp>
4646
47- #include " common.hpp"
4847#include " common/parse_path.hpp"
4948#include " instance.hpp"
49+ #include " make_log_settings.hpp"
5050
5151using namespace std ::chrono_literals;
5252using namespace silkworm ;
Original file line number Diff line number Diff line change 1717#include "rpcdaemon.h"
1818#include "sentry.h"
1919#endif
20+ #include "log_level.h"
2021
2122#if __cplusplus
2223extern "C" {
2324#endif
2425
2526#define SILKWORM_GIT_VERSION_SIZE 32
2627
27- //! Silkworm library logging level
28- //! \note using anonymous C99 enum is the most portable way to pass enum in Cgo
29- typedef enum { // NOLINT(performance-enum-size)
30- SILKWORM_LOG_NONE ,
31- SILKWORM_LOG_CRITICAL ,
32- SILKWORM_LOG_ERROR ,
33- SILKWORM_LOG_WARNING ,
34- SILKWORM_LOG_INFO ,
35- SILKWORM_LOG_DEBUG ,
36- SILKWORM_LOG_TRACE
37- } SilkwormLogLevel ;
38-
3928//! Silkworm library general configuration options
4029struct SilkwormSettings {
4130 //! Log verbosity level
You can’t perform that action at this time.
0 commit comments