clean up action logging
Change-Id: I3c3ca886da7806825b4c949b61b281972d454650
diff --git a/aos/common/actions/actions.h b/aos/common/actions/actions.h
index fa89995..fd88903 100644
--- a/aos/common/actions/actions.h
+++ b/aos/common/actions/actions.h
@@ -225,7 +225,10 @@
template <typename T>
bool TypedAction<T>::DoRunning() {
- if (!sent_started_) return false;
+ if (!sent_started_) {
+ LOG(DEBUG, "haven't sent start message yet\n");
+ return false;
+ }
if (has_started_) {
queue_group_->status.FetchNext();
CheckInterrupted();
diff --git a/aos/common/actions/actor.h b/aos/common/actions/actor.h
index 32c22b1..b3a0220 100644
--- a/aos/common/actions/actor.h
+++ b/aos/common/actions/actor.h
@@ -88,13 +88,13 @@
LOG(DEBUG, "Waiting for input to start\n");
if (action_q_->goal.FetchLatest()) {
- LOG_STRUCT(DEBUG, "goal queue ", *action_q_->goal);
+ LOG_STRUCT(DEBUG, "goal queue", *action_q_->goal);
const uint32_t initially_running = action_q_->goal->run;
if (initially_running != 0) {
while (action_q_->goal->run == initially_running) {
LOG(INFO, "run is still %" PRIx32 "\n", initially_running);
action_q_->goal.FetchNextBlocking();
- LOG_STRUCT(DEBUG, "goal queue ", *action_q_->goal);
+ LOG_STRUCT(DEBUG, "goal queue", *action_q_->goal);
}
}
LOG(DEBUG, "Done waiting, goal\n");
@@ -109,7 +109,7 @@
while (action_q_->goal.get() == nullptr || !action_q_->goal->run) {
LOG(INFO, "Waiting for an action request.\n");
action_q_->goal.FetchNextBlocking();
- LOG_STRUCT(DEBUG, "goal queue ", *action_q_->goal);
+ LOG_STRUCT(DEBUG, "goal queue", *action_q_->goal);
if (!action_q_->goal->run) {
if (!action_q_->status.MakeWithBuilder()
.running(0)
@@ -163,7 +163,7 @@
LOG(INFO, "Waiting for the action (%" PRIx32 ") to be stopped.\n",
running_id);
action_q_->goal.FetchNextBlocking();
- LOG_STRUCT(DEBUG, "goal queue ", *action_q_->goal);
+ LOG_STRUCT(DEBUG, "goal queue", *action_q_->goal);
}
}
@@ -231,7 +231,7 @@
template <class T>
bool ActorBase<T>::ShouldCancel() {
if (action_q_->goal.FetchNext()) {
- LOG_STRUCT(DEBUG, "goal queue ", *action_q_->goal);
+ LOG_STRUCT(DEBUG, "goal queue", *action_q_->goal);
}
bool ans = !action_q_->goal->run;
if (ans) {