Tyler Chatow | 67ddb03 | 2020-01-12 14:30:04 -0800 | [diff] [blame] | 1 | #ifndef AOS_LOGGING_H_ |
| 2 | #define AOS_LOGGING_H_ |
| 3 | |
| 4 | #include "aos/events/event_loop.h" |
| 5 | #include "aos/logging/implementations.h" |
| 6 | #include "aos/logging/log_message_generated.h" |
| 7 | |
| 8 | namespace aos { |
| 9 | |
| 10 | class AosLogToFbs { |
| 11 | public: |
| 12 | AosLogToFbs() {} |
| 13 | |
Tyler Chatow | 67ddb03 | 2020-01-12 14:30:04 -0800 | [diff] [blame] | 14 | void Initialize(Sender<logging::LogMessageFbs> log_sender); |
Austin Schuh | a0c41ba | 2020-09-10 22:59:14 -0700 | [diff] [blame^] | 15 | std::shared_ptr<logging::LogImplementation> implementation() const { |
| 16 | return implementation_; |
| 17 | } |
Tyler Chatow | 67ddb03 | 2020-01-12 14:30:04 -0800 | [diff] [blame] | 18 | |
| 19 | private: |
| 20 | Sender<logging::LogMessageFbs> log_sender_; |
Austin Schuh | a0c41ba | 2020-09-10 22:59:14 -0700 | [diff] [blame^] | 21 | std::shared_ptr<logging::LogImplementation> implementation_; |
Tyler Chatow | 67ddb03 | 2020-01-12 14:30:04 -0800 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | } // namespace aos |
| 25 | |
| 26 | #endif // AOS_LOGGING_H_ |