Skip to content

Commit

Permalink
Fix setting log-level to debug. (ray-project#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
elibol authored and pcmoritz committed Jan 22, 2018
1 parent 4aca016 commit 4b1c8be
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/common/state/redis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down
9 changes: 4 additions & 5 deletions src/global_scheduler/global_scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -299,9 +298,9 @@ void object_table_subscribe_callback(ObjectID object_id,

const std::vector<std::string> 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) ==
Expand All @@ -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());
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/local_scheduler/local_scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ void reconstruct_object_lookup_callback(
bool never_created,
const std::vector<DBClientID> &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. */
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/local_scheduler/local_scheduler_algorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 4b1c8be

Please sign in to comment.