Change log buffer butes to a symbolic const in runtime.

This commit is contained in:
Graydon Hoare
2011-01-14 13:41:39 -08:00
parent bdcb9d9b53
commit fe1a4ab23c
5 changed files with 15 additions and 11 deletions

View File

@@ -136,7 +136,7 @@ append_string(char *buffer, rust_log::ansi_color color,
void
rust_log::trace_ln(uint32_t thread_id, char *prefix, char *message) {
char buffer[1024] = "";
char buffer[BUF_BYTES] = "";
_log_lock.lock();
append_string(buffer, "%-34s", prefix);
for (uint32_t i = 0; i < _indent; i++) {
@@ -158,7 +158,7 @@ rust_log::trace_ln(rust_task *task, char *message) {
#else
uint32_t thread_id = hash((uint32_t) pthread_self());
#endif
char prefix[1024] = "";
char prefix[BUF_BYTES] = "";
if (_dom && _dom->name) {
append_string(prefix, "%04" PRIxPTR ":%.10s:",
thread_id, _dom->name);