Use the event loop name instead of thread name for AOS_LOG
This kills 2 birds with 1 stone.
1) A simulated event loop should print out the name of each event
loop, not the program name.
2) prctl(PR_GET_NAME, thread_name_array) can require higher privileges
sometimes, and is un-necesary for simulations. See 1)
Change-Id: I48731b1cabe34ec66a97f27ee720ba3081da4e94
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/events/aos_logging.h b/aos/events/aos_logging.h
index e99edb7..efb2b25 100644
--- a/aos/events/aos_logging.h
+++ b/aos/events/aos_logging.h
@@ -11,7 +11,10 @@
public:
AosLogToFbs() {}
- void Initialize(Sender<logging::LogMessageFbs> log_sender);
+ // Initializes a sender with the provided name and sender. Note: the name
+ // needs to be valid until this object is destroyed.
+ void Initialize(const std::string *name,
+ Sender<logging::LogMessageFbs> log_sender);
std::shared_ptr<logging::LogImplementation> implementation() const {
return implementation_;
}