define_api_id!(4, "core-v3");
use crate::ErrorCode;
use num_enum::IntoPrimitive;
use num_enum::TryFromPrimitive;
/// Log importance level
#[derive(
Copy, Clone, Debug, Ord, Hash, PartialOrd, PartialEq, Eq, IntoPrimitive, TryFromPrimitive,
)]
#[repr(u32)]
pub enum LogLevel {
/// Error, something went seriously wrong
Error = 0,
/// Warning, something went wrong but was recovered
Warn = 1,
/// Information, information to users
Info = 2,
/// Debug, information to developers
Debug = 3,
/// Trace, low priority & potentially very verbose information for developers
Trace = 4,
}
#[link(wasm_import_module = "ark-core-v3")]
extern "C" {
/// Log a string with the specified log level
pub fn core__log(level: LogLevel, str_ptr: *const u8, str_len: u32) -> ErrorCode;
}