| 148 | } |
| 149 | |
| 150 | int 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 | |
| 171 | int set_log_level_ml_module (int log_level) |
| 172 | { |
no test coverage detected