fixed a few corner case bugs
diff --git a/aos/common/logging/logging_impl.cc b/aos/common/logging/logging_impl.cc
index 0413072..40909c2 100644
--- a/aos/common/logging/logging_impl.cc
+++ b/aos/common/logging/logging_impl.cc
@@ -139,8 +139,9 @@
type_cache::Get(message.structure.type_id).name.c_str());
}
fprintf(output, BASE_FORMAT "%.*s: %.*s\n", BASE_ARGS,
- static_cast<int>(message.message_length), message.message,
- static_cast<int>(output_length), buffer);
+ static_cast<int>(message.structure.string_length),
+ message.structure.serialized,
+ static_cast<int>(sizeof(buffer) - output_length), buffer);
break;
}
}