about summary refs log tree commit diff
path: root/src/rt/rust_message.cpp
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-04-19 12:21:57 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-04-19 16:57:13 +0200
commit880be6a94013ba0b7791b0ca1b6e16104f2f0a1c (patch)
treead8c673f13ec8d2d879175be1a006b08cc6d26d3 /src/rt/rust_message.cpp
parent6511d471bafd446026462ce0dba8ef5e2ebf462f (diff)
downloadrust-880be6a94013ba0b7791b0ca1b6e16104f2f0a1c.tar.gz
rust-880be6a94013ba0b7791b0ca1b6e16104f2f0a1c.zip
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
Diffstat (limited to 'src/rt/rust_message.cpp')
-rw-r--r--src/rt/rust_message.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/rt/rust_message.cpp b/src/rt/rust_message.cpp
index dab13c091e2..19a1d8a367e 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() {