plugin_framework, change func log to plugin_log
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
3d9afbb12a
commit
c009f40152
@ -61,7 +61,7 @@ struct MsgToConfig {
|
|||||||
/// content: The content.
|
/// content: The content.
|
||||||
/// len: The length of the content.
|
/// len: The length of the content.
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cb_msg(
|
pub(super) extern "C" fn cb_msg(
|
||||||
peer: *const c_char,
|
peer: *const c_char,
|
||||||
target: *const c_char,
|
target: *const c_char,
|
||||||
id: *const c_char,
|
id: *const c_char,
|
||||||
|
@ -13,7 +13,7 @@ fn is_level(level: *const c_char, level_bytes: &[u8]) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub(super) extern "C" fn log(level: *const c_char, msg: *const c_char) {
|
pub(super) extern "C" fn plugin_log(level: *const c_char, msg: *const c_char) {
|
||||||
if level.is_null() || msg.is_null() {
|
if level.is_null() || msg.is_null() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ fn load_plugin_path(path: &str) -> ResultType<()> {
|
|||||||
msg: callback_msg::cb_msg,
|
msg: callback_msg::cb_msg,
|
||||||
get_conf: config::cb_get_conf,
|
get_conf: config::cb_get_conf,
|
||||||
get_id: config::cb_get_local_peer_id,
|
get_id: config::cb_get_local_peer_id,
|
||||||
log: super::plog::log,
|
log: super::plog::plugin_log,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
plugin.init(&init_data, path)?;
|
plugin.init(&init_data, path)?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user