MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / log_message

Function log_message

rust_package/brainflow/src/ml_model.rs:89–98  ·  view source on GitHub ↗

Write your own log message to BrainFlow board logger, use it if you wanna have single logger for your own code and BrainFlow's code.

(log_level: LogLevels, message: S)

Source from the content-addressed store, hash-verified

87
88/// Write your own log message to BrainFlow board logger, use it if you wanna have single logger for your own code and BrainFlow's code.
89pub fn log_message<S: AsRef<str>>(log_level: LogLevels, message: S) -> Result<()> {
90 let message = message.as_ref();
91 let message = CString::new(message)?.into_raw();
92 let res = unsafe {
93 let res = ml_module::log_message_ml_module(log_level as c_int, message);
94 let _ = CString::from_raw(message);
95 res
96 };
97 Ok(check_brainflow_exit_code(res)?)
98}
99
100/// Release all classifiers
101pub fn release_all() -> Result<()> {

Callers 15

mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls 2

log_message_ml_moduleFunction · 0.85

Tested by

no test coverage detected