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

Function log_message_ml_module

src/ml/ml_module.cpp:150–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150int log_message_ml_module (int log_level, char *log_message)
151{
152 // its a method for loggging from high level api dont add it to Classifier class since it should
153 // not be used internally
154 std::lock_guard<std::mutex> lock (models_mutex);
155 if (log_level < 0)
156 {
157 BaseClassifier::ml_logger->warn ("log level should be >= 0");
158 log_level = 0;
159 }
160 else if (log_level > 6)
161 {
162 BaseClassifier::ml_logger->warn ("log level should be <= 6");
163 log_level = 6;
164 }
165
166 BaseClassifier::ml_logger->log (spdlog::level::level_enum (log_level), "{}", log_message);
167
168 return (int)BrainFlowExitCodes::STATUS_OK;
169}
170
171int set_log_level_ml_module (int log_level)
172{

Callers 2

log_messageMethod · 0.85
log_messageFunction · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected