diff options
| author | levlam <levlam@telegram.org> | 2021-11-03 16:53:14 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2021-11-03 16:53:14 +0300 |
| commit | 4266841b6428a3e8f05d6993699a1aa78a769470 (patch) | |
| tree | 0f974d78bca199d4d6337b26fbbf6a0de9344bc3 /tdactor | |
| parent | 94172ee9ae55fa4e707bd6e295fe7bc96996f866 (diff) | |
Simplify logging in tdactor.
Diffstat (limited to 'tdactor')
| -rw-r--r-- | tdactor/td/actor/impl/ActorInfo.h | 5 | ||||
| -rw-r--r-- | tdactor/td/actor/impl/Scheduler.h | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/tdactor/td/actor/impl/ActorInfo.h b/tdactor/td/actor/impl/ActorInfo.h index f8e467fdd..6c0bc0d3c 100644 --- a/tdactor/td/actor/impl/ActorInfo.h +++ b/tdactor/td/actor/impl/ActorInfo.h @@ -11,7 +11,6 @@ #include "td/actor/impl/Scheduler-decl.h" #include "td/utils/common.h" -#include "td/utils/format.h" #include "td/utils/Heap.h" #include "td/utils/List.h" #include "td/utils/logging.h" @@ -79,8 +78,6 @@ inline void ActorInfo::on_actor_moved(Actor *actor_new_ptr) { } inline void ActorInfo::clear() { - // LOG_IF(WARNING, !mailbox_.empty()) << "Destroy actor with non-empty mailbox: " << get_name() - // << format::as_array(mailbox_); CHECK(mailbox_.empty()); CHECK(!actor_); CHECK(!is_running()); @@ -189,7 +186,7 @@ inline CSlice ActorInfo::get_name() const { inline void ActorInfo::start_run() { VLOG(actor) << "Start run actor: " << *this; - LOG_CHECK(!is_running_) << "Recursive call of actor " << tag("name", get_name()); + LOG_CHECK(!is_running_) << "Recursive call of actor " << get_name(); is_running_ = true; } inline void ActorInfo::finish_run() { diff --git a/tdactor/td/actor/impl/Scheduler.h b/tdactor/td/actor/impl/Scheduler.h index 30205a493..715960e7a 100644 --- a/tdactor/td/actor/impl/Scheduler.h +++ b/tdactor/td/actor/impl/Scheduler.h @@ -10,7 +10,6 @@ #include "td/actor/impl/Scheduler-decl.h" #include "td/utils/common.h" -#include "td/utils/format.h" #include "td/utils/Heap.h" #include "td/utils/logging.h" #include "td/utils/MpscPollableQueue.h" @@ -108,7 +107,7 @@ ActorOwn<ActorT> Scheduler::register_actor_impl(Slice name, ActorT *actor_ptr, A auto actor_info = info.get(); actor_info->init(sched_id_, name, std::move(info), static_cast<Actor *>(actor_ptr), deleter, ActorTraits<ActorT>::need_context, ActorTraits<ActorT>::need_start_up); - VLOG(actor) << "Create actor " << *actor_info << ": " << tag("actor_count", actor_count_); + VLOG(actor) << "Create actor " << *actor_info << " (actor_count = " << actor_count_ << ')'; ActorId<ActorT> actor_id = weak_info->actor_id(actor_ptr); if (sched_id != sched_id_) { @@ -133,7 +132,7 @@ ActorOwn<ActorT> Scheduler::register_existing_actor(unique_ptr<ActorT> actor_ptr } inline void Scheduler::destroy_actor(ActorInfo *actor_info) { - VLOG(actor) << "Destroy actor " << *actor_info << ": " << tag("actor_count", actor_count_); + VLOG(actor) << "Destroy actor " << *actor_info << " (actor_count = " << actor_count_ << ')'; LOG_CHECK(actor_info->migrate_dest() == sched_id_) << actor_info->migrate_dest() << " " << sched_id_; cancel_actor_timeout(actor_info); |
