From 880be6a94013ba0b7791b0ca1b6e16104f2f0a1c Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Tue, 19 Apr 2011 12:21:57 +0200 Subject: Overhaul logging system in runtime See https://github.com/graydon/rust/wiki/Logging-vision The runtime logging categories are now treated in the same way as modules in compiled code. Each domain now has a log_lvl that can be used to restrict the logging from that domain (will be used to allow logging to be restricted to a single domain). Features dropped (can be brought back to life if there is interest): - Logger indentation - Multiple categories per log statement - I possibly broke some of the color code -- it confuses me --- src/rt/rust_message.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/rt/rust_message.cpp') diff --git a/src/rt/rust_message.cpp b/src/rt/rust_message.cpp index dab13c09..19a1d8a3 100644 --- a/src/rt/rust_message.cpp +++ b/src/rt/rust_message.cpp @@ -51,9 +51,6 @@ send(notification_type type, const char* label, memory_region *region = &target->message_queue->region; notify_message *message = new (region) notify_message(region, type, label, source, target); -// target->referent()->log(rust_log::COMM, -// "==> sending \"%s\" " PTR " in queue " PTR, -// label, message, &target->message_queue); target->message_queue->enqueue(message); } @@ -99,16 +96,13 @@ send(uint8_t *buffer, size_t buffer_sz, const char* label, data_message *message = new (region) data_message(region, buffer, buffer_sz, label, source, port); - source->referent()->log(rust_log::COMM, - "==> sending \"%s\"" PTR " in queue " PTR, - label, message, &port->message_queue); + LOG(source->referent(), comm, "==> sending \"%s\"" PTR " in queue " PTR, + label, message, &port->message_queue); port->message_queue->enqueue(message); } void data_message::process() { _port->referent()->remote_channel->send(_buffer); - // _target->referent()->log(rust_log::COMM, - // "<=== received data via message ==="); } void data_message::kernel_process() { -- cgit v1.2.3