@@ -121,9 +121,9 @@ RobotClient::~RobotClient() {
121121 try {
122122 this ->close ();
123123 } catch (const std::exception& e) {
124- VIAM_LOG (error) << " Received err while closing RobotClient: " << e.what ();
124+ VIAM_SDK_LOG (error) << " Received err while closing RobotClient: " << e.what ();
125125 } catch (...) {
126- VIAM_LOG (error) << " Received unknown err while closing RobotClient" ;
126+ VIAM_SDK_LOG (error) << " Received unknown err while closing RobotClient" ;
127127 }
128128 }
129129}
@@ -150,7 +150,7 @@ std::vector<RobotClient::operation> RobotClient::get_operations() {
150150
151151 grpc::Status const response = impl_->stub_ ->GetOperations (ctx, req, &resp);
152152 if (is_error_response (response)) {
153- VIAM_LOG (error) << " Error getting operations: " << response.error_message ();
153+ VIAM_SDK_LOG (error) << " Error getting operations: " << response.error_message ();
154154 }
155155
156156 for (int i = 0 ; i < resp.operations ().size (); ++i) {
@@ -168,7 +168,7 @@ void RobotClient::cancel_operation(std::string id) {
168168 req.set_id (id);
169169 const grpc::Status response = impl_->stub_ ->CancelOperation (ctx, req, &resp);
170170 if (is_error_response (response)) {
171- VIAM_LOG (error) << " Error canceling operation with id " << id;
171+ VIAM_SDK_LOG (error) << " Error canceling operation with id " << id;
172172 }
173173}
174174
@@ -181,7 +181,7 @@ void RobotClient::block_for_operation(std::string id) {
181181
182182 const grpc::Status response = impl_->stub_ ->BlockForOperation (ctx, req, &resp);
183183 if (is_error_response (response)) {
184- VIAM_LOG (error) << " Error blocking for operation with id " << id;
184+ VIAM_SDK_LOG (error) << " Error blocking for operation with id " << id;
185185 }
186186}
187187
@@ -192,7 +192,7 @@ void RobotClient::refresh() {
192192
193193 const grpc::Status response = impl_->stub_ ->ResourceNames (ctx, req, &resp);
194194 if (is_error_response (response)) {
195- VIAM_LOG (error) << " Error getting resource names: " << response.error_message ();
195+ VIAM_SDK_LOG (error) << " Error getting resource names: " << response.error_message ();
196196 }
197197
198198 std::unordered_map<Name, std::shared_ptr<Resource>> new_resources;
@@ -216,8 +216,8 @@ void RobotClient::refresh() {
216216 const Name name_ ({name.namespace_ (), name.type (), name.subtype ()}, " " , name.name ());
217217 new_resources.emplace (name_, rpc_client);
218218 } catch (const std::exception& exc) {
219- VIAM_LOG (debug) << " Error registering component " << name. subtype () << " : "
220- << exc.what ();
219+ VIAM_SDK_LOG (debug)
220+ << " Error registering component " << name. subtype () << " : " << exc.what ();
221221 }
222222 }
223223 }
@@ -281,9 +281,9 @@ void RobotClient::log(const std::string& name,
281281 if (is_error_response (response)) {
282282 // Manually override to force this to get logged to console so we don't set off an infinite
283283 // loop
284- VIAM_LOG (error) << boost::log::add_value (sdk::impl::attr_console_force_type{}, true )
285- << " Error sending log message over grpc: " << response.error_message ()
286- << response.error_details ();
284+ VIAM_SDK_LOG (error) << boost::log::add_value (sdk::impl::attr_console_force_type{}, true )
285+ << " Error sending log message over grpc: " << response.error_message ()
286+ << response.error_details ();
287287 }
288288}
289289
@@ -339,7 +339,7 @@ std::vector<RobotClient::frame_system_config> RobotClient::get_frame_system_conf
339339
340340 const grpc::Status response = impl_->stub_ ->FrameSystemConfig (ctx, req, &resp);
341341 if (is_error_response (response)) {
342- VIAM_LOG (error) << " Error getting frame system config: " << response.error_message ();
342+ VIAM_SDK_LOG (error) << " Error getting frame system config: " << response.error_message ();
343343 }
344344
345345 const RepeatedPtrField<FrameSystemConfig> configs = resp.frame_system_configs ();
@@ -367,7 +367,7 @@ pose_in_frame RobotClient::transform_pose(
367367
368368 const grpc::Status response = impl_->stub_ ->TransformPose (ctx, req, &resp);
369369 if (is_error_response (response)) {
370- VIAM_LOG (error) << " Error getting PoseInFrame: " << response.error_message ();
370+ VIAM_SDK_LOG (error) << " Error getting PoseInFrame: " << response.error_message ();
371371 }
372372
373373 return from_proto (resp.pose ());
@@ -402,8 +402,8 @@ void RobotClient::stop_all(const std::unordered_map<Name, ProtoStruct>& extra) {
402402 }
403403 const grpc::Status response = impl_->stub_ ->StopAll (ctx, req, &resp);
404404 if (is_error_response (response)) {
405- VIAM_LOG (error) << " Error stopping all: " << response.error_message ()
406- << response.error_details ();
405+ VIAM_SDK_LOG (error) << " Error stopping all: " << response.error_message ()
406+ << response.error_details ();
407407 }
408408}
409409
@@ -431,8 +431,8 @@ RobotClient::status RobotClient::get_machine_status() const {
431431
432432 const grpc::Status response = impl_->stub_ ->GetMachineStatus (ctx, req, &resp);
433433 if (is_error_response (response)) {
434- VIAM_LOG (error) << " Error getting machine status: " << response.error_message ()
435- << response.error_details ();
434+ VIAM_SDK_LOG (error) << " Error getting machine status: " << response.error_message ()
435+ << response.error_details ();
436436 }
437437 switch (resp.state ()) {
438438 case robot::v1::GetMachineStatusResponse_State_STATE_INITIALIZING:
0 commit comments