Skip to content

Commit c89c7f4

Browse files
committed
doc comments
1 parent e6e489a commit c89c7f4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/viam/sdk/robot/client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ struct RobotClient::impl {
108108

109109
std::unique_ptr<RobotService::Stub> stub;
110110

111+
// See doc comment for RobotClient::connect_logging. This pointer is non-null and installed as a
112+
// sink only for apps being run by viam-server as a module.
111113
boost::shared_ptr<viam::sdk::impl::SinkType> log_sink;
112114
};
113115

src/viam/sdk/robot/client.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ class RobotClient {
170170
const std::string& message,
171171
time_pt time);
172172

173+
// Makes this RobotClient manage logging by sending logs over grpc to viam-server.
174+
// This is private and only ever called by ModuleService; in other words it is only called when
175+
// viam-server is running a Viam C++ SDK application as a module.
176+
// Disables console logging so as to avoid log message duplication; console logging is
177+
// re-enabled on destruction.
173178
void connect_logging();
174179

175180
void refresh_every();

0 commit comments

Comments
 (0)