| 53 | |
| 54 | |
| 55 | int log_message_data_handler (int log_level, char *log_message) |
| 56 | { |
| 57 | // its a method for loggging from high level |
| 58 | std::lock_guard<std::mutex> lock (data_mutex); |
| 59 | if (log_level < 0) |
| 60 | { |
| 61 | data_logger->warn ("log level should be >= 0"); |
| 62 | log_level = 0; |
| 63 | } |
| 64 | else if (log_level > 6) |
| 65 | { |
| 66 | data_logger->warn ("log level should be <= 6"); |
| 67 | log_level = 6; |
| 68 | } |
| 69 | |
| 70 | data_logger->log (spdlog::level::level_enum (log_level), "{}", log_message); |
| 71 | |
| 72 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 73 | } |
| 74 | |
| 75 | int set_log_file_data_handler (const char *log_file) |
| 76 | { |
no test coverage detected