blob: 9fd8fd0af9d796a6db4308b73036d486db0335fd [file] [log] [blame]
Sarah Newmana7e87932022-04-11 15:00:03 -07001#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.
11namespace aos {
12namespace logging {
13
14class 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