diff --git a/checkin_notes b/checkin_notes index d185333cbe..471dd23e8d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9615,3 +9615,13 @@ Charlie 16 Oct 2007 api/ boinc_api.C + +David 17 Oct 2007 + - client: improve log messages + + client/ + cs_scheduler.C + pers_file_xfer.C + scheduler_op.C + clienttray/ + tray_win.cpp diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 4ec3ce05ee..2e086ef5d4 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -393,13 +393,14 @@ int CLIENT_STATE::handle_scheduler_reply( if (retval) return retval; if (log_flags.sched_ops) { + msg_printf(project, MSG_INFO, "Scheduler request succeeded: got %d new tasks", sr.results.size()); + } + if (log_flags.sched_op_debug) { if (sr.scheduler_version) { msg_printf(project, MSG_INFO, - "Scheduler request succeeded [server version %d]", + "[sched_ops_debug] Server version %d", sr.scheduler_version ); - } else { - msg_printf(project, MSG_INFO, "Scheduler request succeeded"); } } diff --git a/client/pers_file_xfer.C b/client/pers_file_xfer.C index 713d4d3765..62237c2840 100644 --- a/client/pers_file_xfer.C +++ b/client/pers_file_xfer.C @@ -148,13 +148,13 @@ int PERS_FILE_XFER::create_xfer() { } if (log_flags.file_xfer) { msg_printf( - fip->project, MSG_INFO, "[file_xfer] Started %s of file %s", + fip->project, MSG_INFO, "Started %s of %s", (is_upload ? "upload" : "download"), fip->name ); } if (log_flags.file_xfer_debug) { msg_printf(0, MSG_INFO, - "[file_xfer_debug] PERS_FILE_XFER::start_xfer(): URL: %s\n", + "[file_xfer_debug] URL: %s\n", fip->get_current_url(is_upload) ); } @@ -208,7 +208,7 @@ bool PERS_FILE_XFER::poll() { if (fxp->file_xfer_done) { if (log_flags.file_xfer_debug) { msg_printf(0, MSG_INFO, - "[file_xfer_debug] PERS_FILE_XFER::poll(): file transfer status %d", + "[file_xfer_debug] file transfer status %d", fxp->file_xfer_retval ); } @@ -217,14 +217,16 @@ bool PERS_FILE_XFER::poll() { fip->project->file_xfer_succeeded(is_upload); if (log_flags.file_xfer) { msg_printf( - fip->project, MSG_INFO, "[file_xfer] Finished %s of file %s", + fip->project, MSG_INFO, "Finished %s of %s", is_upload?"upload":"download", fip->name ); + } + if (log_flags.file_xfer_debug) { if (fxp->xfer_speed < 0) { - msg_printf(fip->project, MSG_INFO, "[file_xfer] No data transferred"); + msg_printf(fip->project, MSG_INFO, "[file_xfer_debug] No data transferred"); } else { msg_printf( - fip->project, MSG_INFO, "[file_xfer] Throughput %d bytes/sec", + fip->project, MSG_INFO, "[file_xfer_debug] Throughput %d bytes/sec", (int)fxp->xfer_speed ); } @@ -242,7 +244,7 @@ bool PERS_FILE_XFER::poll() { default: if (log_flags.file_xfer) { msg_printf( - fip->project, MSG_INFO, "[file_xfer] Temporarily failed %s of %s: %s", + fip->project, MSG_INFO, "Temporarily failed %s of %s: %s", is_upload?"upload":"download", fip->name, boincerror(fxp->file_xfer_retval) ); @@ -271,7 +273,7 @@ void PERS_FILE_XFER::permanent_failure(int retval) { pers_xfer_done = true; if (log_flags.file_xfer) { msg_printf( - fip->project, MSG_INFO, "[file_xfer] Giving up on %s of %s: %s", + fip->project, MSG_INFO, "Giving up on %s of %s: %s", is_upload?"upload":"download", fip->name, boincerror(retval) ); } @@ -331,7 +333,7 @@ void PERS_FILE_XFER::do_backoff() { ); next_request_time = gstate.now + backoff; msg_printf(fip->project, MSG_INFO, - "Backing off %s on %s of file %s", + "Backing off %s on %s of %s", timediff_format(backoff).c_str(), is_upload?"upload":"download", fip->name diff --git a/client/scheduler_op.C b/client/scheduler_op.C index af90181833..20246ee1c6 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -218,30 +218,9 @@ int SCHEDULER_OP::start_rpc(PROJECT* p) { safe_strcpy(scheduler_url, p->get_scheduler_url(url_index, url_random)); if (log_flags.sched_ops) { msg_printf(p, MSG_INFO, - "Sending scheduler request: %s", - rpc_reason_string(reason) + "Sending scheduler request: %s. Requesting %.0f seconds of work, reporting %d completed tasks", + rpc_reason_string(reason), p->work_request, p->nresults_returned ); - if (p->work_request>0 && p->nresults_returned != 0) { - msg_printf( - p, MSG_INFO, - "Requesting %.0f seconds of new work, and reporting %d completed tasks", - p->work_request, p->nresults_returned - ); - } else if (p->work_request != 0) { - msg_printf( - p, MSG_INFO, - "Requesting %.0f seconds of new work", - p->work_request - ); - } else if (p->nresults_returned != 0) { - msg_printf(p, MSG_INFO, - "Reporting %d tasks\n", p->nresults_returned - ); - } else { - msg_printf( p, MSG_INFO, - "(not requesting new work or reporting completed tasks)" - ); - } } get_sched_request_filename(*p, request_file, sizeof(request_file)); diff --git a/clienttray/tray_win.cpp b/clienttray/tray_win.cpp index 5a371998d8..7b86221923 100644 --- a/clienttray/tray_win.cpp +++ b/clienttray/tray_win.cpp @@ -133,7 +133,7 @@ DWORD WINAPI CBOINCTray::DataManagementProc() { // This function forwards to DataManagementProc, which has access to the // "this" pointer. // -DWORD WINAPI CBOINCTray::DataManagementProcStub(LPVOID UNUSED(lpParam)) { +DWORD WINAPI CBOINCTray::DataManagementProcStub(LPVOID) { return gspBOINCTray->DataManagementProc(); }