| 310 | } |
| 311 | |
| 312 | void MacroActionSource::LogAction() const |
| 313 | { |
| 314 | auto it = actionTypes.find(_action); |
| 315 | if (it != actionTypes.end()) { |
| 316 | ablog(LOG_INFO, "performed action \"%s\" for Source \"%s\"", |
| 317 | it->second.c_str(), _source.ToString(true).c_str()); |
| 318 | } else { |
| 319 | blog(LOG_WARNING, "ignored unknown source action %d", |
| 320 | static_cast<int>(_action)); |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | bool MacroActionSource::Save(obs_data_t *obj) const |
| 325 | { |