blob: 7309bfc2cc8f72a2989e7bb5e1d8600dd23c0abb [file] [log] [blame]
Sarah Newmana7e87932022-04-11 15:00:03 -07001#include <string>
Sarah Newmana7e87932022-04-11 15:00:03 -07002
Austin Schuh60e77942022-05-16 17:48:24 -07003#include "aos/events/event_loop.h"
Sarah Newmana7e87932022-04-11 15:00:03 -07004#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