@@ -50,24 +50,24 @@ using LogSource = boost::log::sources::severity_channel_logger_mt<log_level>;
5050// / @ingroup Log
5151const char * global_resource_name ();
5252
53- // / @class Logger logger.hpp "log/logger.hpp"
53+ // / @class LogManager logger.hpp "log/logger.hpp"
5454// / @brief Manages the logging infrastructure in the SDDK.
5555// / @ingroup Log
5656// /
5757// / Handles initialization and bookkeeping for logging infrastructure in the C++ SDK. This includes
5858// / console logging, if active, and both global and resource-level log filtering.
59- class Logger {
59+ class LogManager {
6060 public:
6161 struct Filter {
62- const Logger * parent;
62+ const LogManager * parent;
6363
6464 bool operator ()(const boost::log::attribute_value_set&) const ;
6565 };
6666
6767 // / @brief Returns the unique logger instance.
6868 // /
6969 // / This is the only way to access the logger.
70- static Logger & get ();
70+ static LogManager & get ();
7171
7272 // / @brief Set the global logger severity.
7373 void set_global_log_level (log_level);
@@ -82,28 +82,29 @@ class Logger {
8282
8383 // / @brief Set the logger severity for a resource.
8484 // /
85- // / Logger can maintain separate severity levels for individual resources. For example, you may
86- // / want to only report "error" messages for global logs and logs for one component of a modular
87- // / resource, but enable verbose logging for a new component that is still being debugged.
85+ // / LogManager can maintain separate severity levels for individual resources. For example, you
86+ // / may want to only report "error" messages for global logs and logs for one component of a
87+ // / modular resource, but enable verbose logging for a new component that is still being
88+ // / debugged.
8889 // / @see @ref Resource, which has a set_log_level method which automatically provides its own
8990 // / resource name.
9091 void set_resource_log_level (const std::string& resource, log_level);
9192
9293 // / @brief Return the SDK global log source.
9394 // /
9495 // / Users should prefer to log messages using the logging macros below.
95- LogSource& logger ();
96+ LogSource& global_logger ();
9697
9798 private:
9899 friend class RobotClient ;
99100 friend class Instance ;
100- Logger () = default ;
101+ LogManager () = default ;
101102
102- Logger (const Logger &) = delete ;
103- Logger (Logger &&) = delete ;
103+ LogManager (const LogManager &) = delete ;
104+ LogManager (LogManager &&) = delete ;
104105
105- Logger & operator =(const Logger &) = delete ;
106- Logger & operator =(Logger &&) = delete ;
106+ LogManager & operator =(const LogManager &) = delete ;
107+ LogManager & operator =(LogManager &&) = delete ;
107108
108109 void init_logging ();
109110 void disable_console_logging ();
@@ -143,7 +144,7 @@ BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE(attr_time,
143144// / @ingroup Log
144145// /
145146// / Use this macro to generate log messages pertaining to the SDK at large.
146- #define VIAM_LOG (level ) VIAM_LOG_IMPL(::viam::sdk::Logger ::get().logger (), level)
147+ #define VIAM_LOG (level ) VIAM_LOG_IMPL(::viam::sdk::LogManager ::get().global_logger (), level)
147148
148149// / @brief Log macro for resource-level logs.
149150// / @ingroup Log
0 commit comments