24 #include <aspect/inifins/logger.h>
25 #include <aspect/logger.h>
26 #include <core/threading/thread_finalizer.h>
27 #include <core/threading/thread_initializer.h>
28 #include <logging/logger_employer.h>
50 if (logger_thread == 0) {
52 "LoggerAspect, but RTTI says it "
58 employer_->
add_logger(logger_thread->get_logger());
59 }
catch (Exception &e) {
60 CannotInitializeThreadException ce(
"Thread has LoggerAspect but Logger "
61 "could not be added.");
65 throw CannotInitializeThreadException(
"Thread has LoggerAspect but Logger "
66 "could not be added.");
73 LoggerAspect *logger_thread;
74 logger_thread =
dynamic_cast<LoggerAspect *
>(thread);
75 if (logger_thread == 0) {
76 throw CannotFinalizeThreadException(
"Thread '%s' claims to have the "
77 "LoggerAspect, but RTTI says it "
84 }
catch (Exception &e) {
85 CannotFinalizeThreadException ce(
"Failed to remove logger");