8 #include <boost/assert.hpp> 16 std::shared_ptr<const runtime::MemoryProvider> memory_provider)
17 : memory_provider_(
std::move(memory_provider)),
35 switch (static_cast<WasmLogLevel>(level)) {
37 logger_->error(
"target: {}, message: {}", target_str, message_str);
39 case WasmLogLevel::Warn:
40 logger_->warn(
"target: {}, message: {}", target_str, message_str);
42 case WasmLogLevel::Info:
43 logger_->info(
"target: {}, message: {}", target_str, message_str);
45 case WasmLogLevel::Debug:
46 SL_DEBUG(
logger_,
"target: {}, message: {}", target_str, message_str);
48 case WasmLogLevel::Trace:
49 SL_TRACE(
logger_,
"target: {}, message: {}", target_str, message_str);
52 BOOST_UNREACHABLE_RETURN();
54 "Message with incorrect log level. Target: {}, message: {}",
void ext_logging_log_version_1(runtime::WasmEnum level, runtime::WasmSpan target, runtime::WasmSpan message)
IOExtension(std::shared_ptr< const runtime::MemoryProvider > memory_provider)
WasmLogLevel
type of wasm log levels
uint64_t WasmSpan
combination of pointer and size, where less significant part represents wasm pointer, and most significant represents size
uint32_t WasmEnum
Enum value is uint32_t.
runtime::WasmEnum ext_logging_max_level_version_1()
std::shared_ptr< const runtime::MemoryProvider > memory_provider_
Logger createLogger(const std::string &tag)