From 4b1c8be4fe3a5764869d0d78d8c58046492a77f6 Mon Sep 17 00:00:00 2001 From: Melih Elibol Date: Sun, 21 Jan 2018 21:51:05 -0800 Subject: [PATCH] Fix setting log-level to debug. (#1432) --- src/common/state/redis.cc | 6 +++--- src/global_scheduler/global_scheduler.cc | 9 ++++----- src/local_scheduler/local_scheduler.cc | 4 ++-- src/local_scheduler/local_scheduler_algorithm.cc | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/common/state/redis.cc b/src/common/state/redis.cc index ab7c5a9aa..2ad5bfc90 100644 --- a/src/common/state/redis.cc +++ b/src/common/state/redis.cc @@ -1375,7 +1375,7 @@ void redis_local_scheduler_table_send_info_callback(redisAsyncContext *c, redisReply *reply = (redisReply *) r; CHECK(reply->type == REDIS_REPLY_INTEGER); - LOG_DEBUG("%" PRId64 " subscribers received this publish.\n", reply->integer); + LOG_DEBUG("%lld subscribers received this publish.\n", reply->integer); CHECK(callback_data->done_callback == NULL); /* Clean up the timer and callback. */ @@ -1417,7 +1417,7 @@ void redis_local_scheduler_table_disconnect(DBHandle *db) { (size_t) fbb.GetSize()); CHECK(reply->type != REDIS_REPLY_ERROR); CHECK(reply->type == REDIS_REPLY_INTEGER); - LOG_DEBUG("%" PRId64 " subscribers received this publish.\n", reply->integer); + LOG_DEBUG("%lld subscribers received this publish.\n", reply->integer); freeReplyObject(reply); } @@ -1476,7 +1476,7 @@ void redis_driver_table_send_driver_death_callback(redisAsyncContext *c, redisReply *reply = (redisReply *) r; CHECK(reply->type == REDIS_REPLY_INTEGER); - LOG_DEBUG("%" PRId64 " subscribers received this publish.\n", reply->integer); + LOG_DEBUG("%lld subscribers received this publish.\n", reply->integer); /* At the very least, the local scheduler that publishes this message should * also receive it. */ CHECK(reply->integer >= 1); diff --git a/src/global_scheduler/global_scheduler.cc b/src/global_scheduler/global_scheduler.cc index 8a0a64a80..cb6748277 100644 --- a/src/global_scheduler/global_scheduler.cc +++ b/src/global_scheduler/global_scheduler.cc @@ -66,8 +66,7 @@ void assign_task_to_local_scheduler(GlobalSchedulerState *state, DBClientID local_scheduler_id) { std::string id_string = local_scheduler_id.hex(); TaskSpec *spec = Task_task_execution_spec(task)->Spec(); - LOG_DEBUG("assigning task to local_scheduler_id = %s", local_scheduler_id, - id_string.c_str()); + LOG_DEBUG("assigning task to local_scheduler_id = %s", id_string.c_str()); Task_set_state(task, TASK_STATUS_SCHEDULED); Task_set_local_scheduler(task, local_scheduler_id); id_string = Task_task_id(task).hex(); @@ -299,9 +298,9 @@ void object_table_subscribe_callback(ObjectID object_id, const std::vector managers = db_client_table_get_ip_addresses(state->db, manager_ids); - LOG_DEBUG("\tManagers<%d>:", managers.size()); + LOG_DEBUG("\tManagers<%lu>:", managers.size()); for (size_t i = 0; i < managers.size(); i++) { - LOG_DEBUG("\t\t%s", managers[i]); + LOG_DEBUG("\t\t%s", managers[i].c_str()); } if (state->scheduler_object_info_table.find(object_id) == @@ -316,7 +315,7 @@ void object_table_subscribe_callback(ObjectID object_id, id_string.c_str()); LOG_DEBUG("\tmanager locations:"); for (size_t i = 0; i < managers.size(); i++) { - LOG_DEBUG("\t\t%s", managers[i]); + LOG_DEBUG("\t\t%s", managers[i].c_str()); } } diff --git a/src/local_scheduler/local_scheduler.cc b/src/local_scheduler/local_scheduler.cc index fa7c8d1f8..4b5c86fef 100644 --- a/src/local_scheduler/local_scheduler.cc +++ b/src/local_scheduler/local_scheduler.cc @@ -786,7 +786,7 @@ void reconstruct_object_lookup_callback( bool never_created, const std::vector &manager_ids, void *user_context) { - LOG_DEBUG("Manager count was %d", manager_ids.size()); + LOG_DEBUG("Manager count was %lu", manager_ids.size()); /* Only continue reconstruction if we find that the object doesn't exist on * any nodes. NOTE: This codepath is not responsible for checking if the * object table entry is up-to-date. */ @@ -1201,7 +1201,7 @@ void handle_task_scheduled_callback(Task *original_task, * scheduling algorithm. */ WorkerID driver_id = TaskSpec_driver_id(spec); if (!is_driver_alive(state, driver_id)) { - LOG_DEBUG("Ignoring scheduled task for removed driver.") + LOG_DEBUG("Ignoring scheduled task for removed driver."); return; } diff --git a/src/local_scheduler/local_scheduler_algorithm.cc b/src/local_scheduler/local_scheduler_algorithm.cc index f6199f348..04cd535e1 100644 --- a/src/local_scheduler/local_scheduler_algorithm.cc +++ b/src/local_scheduler/local_scheduler_algorithm.cc @@ -1567,7 +1567,7 @@ int num_dispatch_tasks(SchedulingAlgorithmState *algorithm_state) { void print_worker_info(const char *message, SchedulingAlgorithmState *algorithm_state) { - LOG_DEBUG("%s: %d available, %d executing, %d blocked", message, + LOG_DEBUG("%s: %lu available, %lu executing, %lu blocked", message, algorithm_state->available_workers.size(), algorithm_state->executing_workers.size(), algorithm_state->blocked_workers.size());