Commit 77db78aa authored by Dominik Charousset's avatar Dominik Charousset

Add more actor names to improve log output

parent e7dffe87
...@@ -27,7 +27,8 @@ namespace caf { ...@@ -27,7 +27,8 @@ namespace caf {
namespace { namespace {
struct impl : blocking_actor { class impl : public blocking_actor {
public:
impl(actor_config& cfg) : blocking_actor(cfg) { impl(actor_config& cfg) : blocking_actor(cfg) {
is_detached(true); is_detached(true);
} }
...@@ -35,6 +36,10 @@ struct impl : blocking_actor { ...@@ -35,6 +36,10 @@ struct impl : blocking_actor {
void act() override { void act() override {
CAF_LOG_ERROR("act() of scoped_actor impl called"); CAF_LOG_ERROR("act() of scoped_actor impl called");
} }
const char* name() const override {
return "scoped_actor";
}
}; };
} // namespace <anonymous> } // namespace <anonymous>
...@@ -43,9 +48,8 @@ scoped_actor::scoped_actor(actor_system& sys, bool hidden) : context_{&sys} { ...@@ -43,9 +48,8 @@ scoped_actor::scoped_actor(actor_system& sys, bool hidden) : context_{&sys} {
actor_config cfg{&context_}; actor_config cfg{&context_};
self_ = make_actor<impl, strong_actor_ptr>(sys.next_actor_id(), sys.node(), self_ = make_actor<impl, strong_actor_ptr>(sys.next_actor_id(), sys.node(),
&sys, cfg); &sys, cfg);
if (! hidden) { if (! hidden)
prev_ = CAF_SET_AID(self_->id()); prev_ = CAF_SET_AID(self_->id());
}
CAF_LOG_TRACE(CAF_ARG(hidden)); CAF_LOG_TRACE(CAF_ARG(hidden));
ptr()->is_registered(! hidden); ptr()->is_registered(! hidden);
} }
......
...@@ -129,6 +129,8 @@ struct basp_broker_state : proxy_registry::backend, basp::instance::callee { ...@@ -129,6 +129,8 @@ struct basp_broker_state : proxy_registry::backend, basp::instance::callee {
const node_id& this_node() const { const node_id& this_node() const {
return instance.this_node(); return instance.this_node();
} }
static const char* name;
}; };
/// A broker implementation for the Binary Actor System Protocol (BASP). /// A broker implementation for the Binary Actor System Protocol (BASP).
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
namespace caf { namespace caf {
namespace io { namespace io {
const char* basp_broker_state::name = "basp_broker";
/****************************************************************************** /******************************************************************************
* basp_broker_state * * basp_broker_state *
******************************************************************************/ ******************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment