blob: 352d4b724a43302ab23f5d013563ae24f5a37b39 [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"
Stephan Pleines0960c262024-05-31 20:29:24 -07005#include "aos/macros.h"
Sarah Newmana7e87932022-04-11 15:00:03 -07006
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.
Stephan Pleinesd99b1ee2024-02-02 20:56:44 -080011namespace aos::logging {
Sarah Newmana7e87932022-04-11 15:00:03 -070012
13class DynamicLogging {
14 public:
15 DynamicLogging(aos::EventLoop *event_loop);
16 ~DynamicLogging() {}
17
18 private:
19 void HandleDynamicLogCommand(const DynamicLogCommand &command);
20 std::string application_name_;
21 DISALLOW_COPY_AND_ASSIGN(DynamicLogging);
22};
23
Stephan Pleinesd99b1ee2024-02-02 20:56:44 -080024} // namespace aos::logging