Sarah Newman | a7e8793 | 2022-04-11 15:00:03 -0700 | [diff] [blame^] | 1 | #include <string> |
| 2 | #include "aos/events/event_loop.h" |
| 3 | |
| 4 | #include "aos/logging/dynamic_log_command_generated.h" |
| 5 | #include "glog/logging.h" |
| 6 | |
| 7 | // The purpose of this class is to listen for /aos aos.logging.DynamicLogCommand |
| 8 | // and make changes to the log level of the current application based on that |
| 9 | // message. Currently the only supported command is changing the global vlog |
| 10 | // level. |
| 11 | namespace aos { |
| 12 | namespace logging { |
| 13 | |
| 14 | class DynamicLogging { |
| 15 | public: |
| 16 | DynamicLogging(aos::EventLoop *event_loop); |
| 17 | ~DynamicLogging() {} |
| 18 | |
| 19 | private: |
| 20 | void HandleDynamicLogCommand(const DynamicLogCommand &command); |
| 21 | std::string application_name_; |
| 22 | DISALLOW_COPY_AND_ASSIGN(DynamicLogging); |
| 23 | }; |
| 24 | |
| 25 | } // namespace logging |
| 26 | } // namespace aos |