Forward log and log level to custom bh_log callback (#3070)
Follow-up on #2907. The log level is needed in the host embedder to better integrate with the embedder's logger. Allow the developer to customize his bh_log callback with `cmake -DWAMR_BH_LOG=<log_callback>`, and update sample/basic to show the usage.
This commit is contained in:
@ -338,6 +338,9 @@ endif ()
|
||||
if (DEFINED WAMR_BH_VPRINTF)
|
||||
add_definitions (-DBH_VPRINTF=${WAMR_BH_VPRINTF})
|
||||
endif ()
|
||||
if (DEFINED WAMR_BH_LOG)
|
||||
add_definitions (-DBH_LOG=${WAMR_BH_LOG})
|
||||
endif ()
|
||||
if (WAMR_DISABLE_APP_ENTRY EQUAL 1)
|
||||
message (" WAMR application entry functions excluded")
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user