Commit 923e91c3 authored by Dominik Charousset's avatar Dominik Charousset

Log scoped and blocking actors too

parent 5a61e5da
This diff is collapsed.
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "caf/mixin/memory_cached.hpp" #include "caf/mixin/memory_cached.hpp"
#include "caf/detail/logging.hpp"
#include "caf/detail/behavior_stack.hpp" #include "caf/detail/behavior_stack.hpp"
#include "caf/detail/typed_actor_util.hpp" #include "caf/detail/typed_actor_util.hpp"
#include "caf/detail/single_reader_queue.hpp" #include "caf/detail/single_reader_queue.hpp"
......
...@@ -61,8 +61,8 @@ class event_based_resume { ...@@ -61,8 +61,8 @@ class event_based_resume {
size_t max_throughput) override { size_t max_throughput) override {
CAF_REQUIRE(max_throughput > 0); CAF_REQUIRE(max_throughput > 0);
auto d = static_cast<Derived*>(this); auto d = static_cast<Derived*>(this);
d->host(new_host);
CAF_LOG_TRACE("id = " << d->id()); CAF_LOG_TRACE("id = " << d->id());
d->host(new_host);
auto done_cb = [&]() -> bool { auto done_cb = [&]() -> bool {
CAF_LOG_TRACE(""); CAF_LOG_TRACE("");
d->bhvr_stack().clear(); d->bhvr_stack().clear();
......
...@@ -89,6 +89,7 @@ class invoke_policy { ...@@ -89,6 +89,7 @@ class invoke_policy {
if (!node_ptr) { if (!node_ptr) {
return false; return false;
} }
CAF_LOG_TRACE("");
switch (handle_message(self, node_ptr.get(), fun, awaited_response)) { switch (handle_message(self, node_ptr.get(), fun, awaited_response)) {
case hm_msg_handled: case hm_msg_handled:
node_ptr.reset(); node_ptr.reset();
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "caf/exception.hpp" #include "caf/exception.hpp"
#include "caf/exit_reason.hpp" #include "caf/exit_reason.hpp"
#include "caf/detail/logging.hpp"
#include "caf/policy/resume_policy.hpp" #include "caf/policy/resume_policy.hpp"
namespace caf { namespace caf {
...@@ -29,6 +30,7 @@ class no_resume { ...@@ -29,6 +30,7 @@ class no_resume {
} }
resumable::resume_result resume(execution_unit*, size_t) { resumable::resume_result resume(execution_unit*, size_t) {
CAF_LOG_TRACE("");
uint32_t rsn = exit_reason::normal; uint32_t rsn = exit_reason::normal;
try { try {
this->act(); this->act();
......
...@@ -34,7 +34,9 @@ namespace caf { ...@@ -34,7 +34,9 @@ namespace caf {
namespace { namespace {
struct impl : blocking_actor { struct impl : blocking_actor {
void act() override {} void act() override {
CAF_LOG_ERROR("act() of scoped_actor impl called");
}
}; };
blocking_actor* alloc() { blocking_actor* alloc() {
...@@ -48,10 +50,11 @@ blocking_actor* alloc() { ...@@ -48,10 +50,11 @@ blocking_actor* alloc() {
void scoped_actor::init(bool hide_actor) { void scoped_actor::init(bool hide_actor) {
m_self.reset(alloc()); m_self.reset(alloc());
m_self->is_registered(!hide_actor);
if (!hide_actor) { if (!hide_actor) {
m_prev = CAF_SET_AID(m_self->id()); m_prev = CAF_SET_AID(m_self->id());
} }
CAF_LOG_TRACE(CAF_ARG(hide_actor));
m_self->is_registered(!hide_actor);
} }
scoped_actor::scoped_actor() { scoped_actor::scoped_actor() {
...@@ -63,6 +66,7 @@ scoped_actor::scoped_actor(bool hide_actor) { ...@@ -63,6 +66,7 @@ scoped_actor::scoped_actor(bool hide_actor) {
} }
scoped_actor::~scoped_actor() { scoped_actor::~scoped_actor() {
CAF_LOG_TRACE("");
if (m_self->is_registered()) { if (m_self->is_registered()) {
CAF_SET_AID(m_prev); CAF_SET_AID(m_prev);
} }
......
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