Skip to content

Commit 094ae51

Browse files
Pass through OE logging, 5.0.14 release notes (#6888)
Co-authored-by: Max <[email protected]>
1 parent 6f83884 commit 094ae51

File tree

6 files changed

+5
-61
lines changed

6 files changed

+5
-61
lines changed

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
### Fixed
1313

1414
- `ccf.ledger`/`read_ledger.py` previously enforced too strict a condition on node membership when validating ledger files (#6849).
15+
- Removed default value for redirection-kind parameter to start_network script (#6887).
16+
- Don't throw error if the ledger directory exists but is empty on node start (#6885).
17+
- Open Enclave logs directly to standard output, without restriction (#6888)
1518

1619
## [5.0.13]
1720

Diff for: edl/ccf.edl

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the Apache 2.0 License.
33

44
enclave {
5+
from "openenclave/edl/logging.edl" import *;
56
from "openenclave/edl/sgx/platform.edl" import *;
67
from "openenclave/edl/time.edl" import *;
78

Diff for: include/ccf/pal/enclave.h

-37
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ namespace ccf::pal
1616
{
1717
#if !defined(INSIDE_ENCLAVE) || defined(VIRTUAL_ENCLAVE)
1818

19-
static inline void redirect_platform_logging() {}
20-
2119
static inline void initialize_enclave() {}
2220

2321
static inline void shutdown_enclave() {}
@@ -29,41 +27,6 @@ namespace ccf::pal
2927

3028
#else
3129

32-
static void open_enclave_logging_callback(
33-
void* context,
34-
oe_log_level_t level,
35-
uint64_t thread_id,
36-
const char* message)
37-
{
38-
switch (level)
39-
{
40-
case OE_LOG_LEVEL_FATAL:
41-
CCF_LOG_FMT(FATAL, "")("OE: {}", message);
42-
break;
43-
case OE_LOG_LEVEL_ERROR:
44-
CCF_LOG_FMT(FAIL, "")("OE: {}", message);
45-
break;
46-
case OE_LOG_LEVEL_WARNING:
47-
CCF_LOG_FMT(FAIL, "")("OE: {}", message);
48-
break;
49-
case OE_LOG_LEVEL_INFO:
50-
CCF_LOG_FMT(INFO, "")("OE: {}", message);
51-
break;
52-
case OE_LOG_LEVEL_VERBOSE:
53-
CCF_LOG_FMT(DEBUG, "")("OE: {}", message);
54-
break;
55-
case OE_LOG_LEVEL_MAX:
56-
case OE_LOG_LEVEL_NONE:
57-
CCF_LOG_FMT(TRACE, "")("OE: {}", message);
58-
break;
59-
}
60-
}
61-
62-
static inline void redirect_platform_logging()
63-
{
64-
oe_enclave_log_set_callback(nullptr, &open_enclave_logging_callback);
65-
}
66-
6730
static inline void initialize_enclave()
6831
{
6932
auto rc = oe_attester_initialize();

Diff for: src/enclave/main.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ extern "C"
134134
auto ringbuffer_logger = new_logger.get();
135135
ccf::logger::config::loggers().push_back(std::move(new_logger));
136136

137-
ccf::pal::redirect_platform_logging();
138-
139137
enclave_sanity_checks();
140138

141139
{

Diff for: src/host/enclave.h

-19
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,6 @@
2222
# include "enclave/virtual_enclave.h"
2323
#endif
2424

25-
extern "C"
26-
{
27-
#ifdef PLATFORM_SGX
28-
void nop_oe_logger(
29-
void* context,
30-
bool is_enclave,
31-
const struct tm* t,
32-
long int usecs,
33-
oe_log_level_t level,
34-
uint64_t host_thread_id,
35-
const char* message)
36-
{}
37-
#endif
38-
}
39-
4025
namespace host
4126
{
4227
void expect_enclave_file_suffix(
@@ -128,10 +113,6 @@ namespace host
128113
expect_enclave_file_suffix(path, ".enclave.so.signed", type);
129114
}
130115

131-
# ifdef CCF_DISABLE_VERBOSE_LOGGING
132-
oe_log_set_callback(nullptr, nop_oe_logger);
133-
# endif
134-
135116
auto err = oe_create_ccf_enclave(
136117
path.c_str(),
137118
OE_ENCLAVE_TYPE_SGX,

Diff for: tests/infra/remote.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,7 @@ def __init__(
666666
snp_uvm_security_context_dir
667667
)
668668

669-
oe_log_level = CCF_TO_OE_LOG_LEVEL.get(kwargs.get("host_log_level"))
670-
if oe_log_level:
671-
env["OE_LOG_LEVEL"] = oe_log_level
669+
env["OE_LOG_LEVEL"] = "INFO"
672670

673671
self.name = f"{label}_{local_node_id}"
674672
self.start_type = start_type

0 commit comments

Comments
 (0)