| 13 | pFileStrategy_{ std::move(pFileStrategy) } |
| 14 | {} |
| 15 | void BasicFileDriver::Submit(const Entry& e) |
| 16 | { |
| 17 | if (pFormatter_ && pFileStrategy_) { |
| 18 | auto pFile = pFileStrategy_->AddLine(); |
| 19 | *pFile << pFormatter_->Format(e); |
| 20 | } |
| 21 | else { |
| 22 | if (!pFormatter_) { |
| 23 | pmlog_panic_("BasicFileDriver submitted to without a formatter set"); |
| 24 | } |
| 25 | if (!pFileStrategy_) { |
| 26 | pmlog_panic_("BasicFileDriver submitted to without a file strategy set"); |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | void BasicFileDriver::SetFormatter(std::shared_ptr<ITextFormatter> pFormatter) |
| 31 | { |
| 32 | pFormatter_ = std::move(pFormatter); |