| 1176 | } |
| 1177 | |
| 1178 | bool |
| 1179 | LogObjectManager::unmanage_api_object(LogObject *logObject) |
| 1180 | { |
| 1181 | if (!logObject) { |
| 1182 | return false; |
| 1183 | } |
| 1184 | |
| 1185 | ACQUIRE_API_MUTEX("A LogObjectManager::unmanage_api_object"); |
| 1186 | |
| 1187 | auto index = std::find(this->_APIobjects.begin(), this->_APIobjects.end(), logObject); |
| 1188 | |
| 1189 | if (index != this->_APIobjects.end()) { |
| 1190 | this->_APIobjects.erase(index); |
| 1191 | |
| 1192 | // Force a buffer flush, then schedule this LogObject to be deleted on the eventProcessor. |
| 1193 | logObject->force_new_buffer(); |
| 1194 | new_Derefer(logObject, HRTIME_SECONDS(60)); |
| 1195 | |
| 1196 | RELEASE_API_MUTEX("R LogObjectManager::unmanage_api_object"); |
| 1197 | return true; |
| 1198 | } |
| 1199 | |
| 1200 | RELEASE_API_MUTEX("R LogObjectManager::unmanage_api_object"); |
| 1201 | return false; |
| 1202 | } |
| 1203 | |
| 1204 | void |
| 1205 | LogObjectManager::add_filter_to_all(LogFilter *filter) |
no test coverage detected