Use logger for runtime error/debug prints (#3097)
Change runtime internal error/debug prints from using `os_printf()` to using `LOG_ERROR()`/`LOG_DEBUG()`.
This commit is contained in:
@ -160,10 +160,10 @@ jit_compiler_compile(WASMModule *module, uint32 func_idx)
|
||||
|
||||
#if WASM_ENABLE_CUSTOM_NAME_SECTION != 0
|
||||
char *function_name = cc->cur_wasm_func->field_name;
|
||||
os_printf("fast jit compilation failed: %s (function_name=%s)\n",
|
||||
LOG_ERROR("fast jit compilation failed: %s (function_name=%s)\n",
|
||||
last_error ? last_error : "unknown error", function_name);
|
||||
#else
|
||||
os_printf("fast jit compilation failed: %s\n",
|
||||
LOG_ERROR("fast jit compilation failed: %s\n",
|
||||
last_error ? last_error : "unknown error");
|
||||
#endif
|
||||
|
||||
|
||||
@ -1093,7 +1093,7 @@ init_func_translation(JitCompContext *cc)
|
||||
|| !(jit_frame = jit_calloc(offsetof(JitFrame, lp)
|
||||
+ sizeof(*jit_frame->lp)
|
||||
* (max_locals + max_stacks)))) {
|
||||
os_printf("allocate jit frame failed\n");
|
||||
LOG_ERROR("allocate jit frame failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user