Simplify logging in tdactor.

This commit is contained in:
levlam 2021-11-03 16:53:14 +03:00
parent 94172ee9ae
commit 4266841b64
2 changed files with 3 additions and 7 deletions

View File

@ -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() {

View File

@ -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);