blob: 0dfd181e6b5b29482339d7c2262a98f0e52ecfb2 [file] [log] [blame]
Sarah Newmana7e87932022-04-11 15:00:03 -07001#include <string>
Sarah Newmana7e87932022-04-11 15:00:03 -07002
Philipp Schrader790cb542023-07-05 21:06:52 -07003#include "glog/logging.h"
4
Austin Schuh60e77942022-05-16 17:48:24 -07005#include "aos/events/event_loop.h"
Sarah Newmana7e87932022-04-11 15:00:03 -07006#include "aos/logging/dynamic_log_command_generated.h"
Sarah Newmana7e87932022-04-11 15:00:03 -07007
8// The purpose of this class is to listen for /aos aos.logging.DynamicLogCommand
9// and make changes to the log level of the current application based on that
10// message. Currently the only supported command is changing the global vlog
11// level.
12namespace aos {
13namespace logging {
14
15class DynamicLogging {
16 public:
17 DynamicLogging(aos::EventLoop *event_loop);
18 ~DynamicLogging() {}
19
20 private:
21 void HandleDynamicLogCommand(const DynamicLogCommand &command);
22 std::string application_name_;
23 DISALLOW_COPY_AND_ASSIGN(DynamicLogging);
24};
25
26} // namespace logging
27} // namespace aos