Coverage Report

Created: 2025-07-01 06:18

/src/WasmEdge/include/plugin/wasi_logging/base.h
Line
Count
Source (jump to first uncovered line)
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: 2019-2024 Second State INC
3
4
// BUILTIN-PLUGIN: Temporary move the wasi-logging plugin sources here until
5
// the new plugin architecture ready in 0.15.0.
6
7
#pragma once
8
9
#include "env.h"
10
11
#include "common/errcode.h"
12
#include "runtime/callingframe.h"
13
#include "runtime/hostfunc.h"
14
15
namespace WasmEdge {
16
namespace Host {
17
namespace WASILogging {
18
19
enum class LogLevel : uint32_t { Trace, Debug, Info, Warn, Error, Critical };
20
21
template <typename T> class Func : public Runtime::HostFunction<T> {
22
public:
23
0
  Func(LogEnv &HostEnv) : Runtime::HostFunction<T>(0), Env(HostEnv) {}
24
25
protected:
26
  LogEnv &Env;
27
};
28
29
} // namespace WASILogging
30
} // namespace Host
31
} // namespace WasmEdge