Synchronous logging processor ! Synchronous logging processor process the given logging record under the critical section to avoid races in not thread-safe layouts, filters and appenders. Thread-safe. */
| 24 | Thread-safe. |
| 25 | */ |
| 26 | class SyncProcessor : public Processor |
| 27 | { |
| 28 | public: |
| 29 | //! Initialize synchronous logging processor with a given layout interface |
| 30 | /*! |
| 31 | \param layout - Logging layout interface |
| 32 | */ |
| 33 | explicit SyncProcessor(const std::shared_ptr<Layout>& layout) : Processor(layout) {} |
| 34 | SyncProcessor(const SyncProcessor&) = delete; |
| 35 | SyncProcessor(SyncProcessor&&) = delete; |
| 36 | virtual ~SyncProcessor() = default; |
| 37 | |
| 38 | SyncProcessor& operator=(const SyncProcessor&) = delete; |
| 39 | SyncProcessor& operator=(SyncProcessor&&) = delete; |
| 40 | |
| 41 | // Implementation of Processor |
| 42 | bool ProcessRecord(Record& record) override; |
| 43 | void Flush() override; |
| 44 | |
| 45 | private: |
| 46 | CppCommon::CriticalSection _lock; |
| 47 | }; |
| 48 | |
| 49 | } // namespace CppLogging |
| 50 |
nothing calls this directly
no outgoing calls
no test coverage detected