GNOME Bugzilla – Bug 755104
Unify send_reply debug messages
Last modified: 2015-09-23 08:19:23 UTC
Sometimes I wonder why I can't see failure in a debug output if job failed. There isn't indication about errors in some send_reply debug messages for some jobs (i.e. close, read, write, seek, truncate).
Created attachment 311441 [details] [review] job: Unify send_reply debug messages Unify send_reply debug messages for all jobs. Always indicate failure and include error message. Indicate some other info (i.e. offset, size) for some jobs (i.e. seek, read, write).
Review of attachment 311441 [details] [review]: Nice work, that should be useful. Looks good apart from some minor formatting comments. ::: daemon/gvfsjobcloseread.c @@ +93,3 @@ GVfsJobCloseRead *op_job = G_VFS_JOB_CLOSE_READ (job); + g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed, job->failed?job->error->message:""); Shouldn't there be spaces around ? and : ::: daemon/gvfsjobclosewrite.c @@ +101,3 @@ GVfsJobCloseWrite *op_job = G_VFS_JOB_CLOSE_WRITE (job); + g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed, job->failed?job->error->message:""); ditto for the rest ::: daemon/gvfsjobread.c @@ +99,3 @@ + + g_debug ("send_reply(%p), bytes=%"G_GSIZE_FORMAT", failed=%d (%s)\n", + job, op_job->data_count, job->failed, job->failed?job->error->message:""); Best not to introduce new tabs. ::: daemon/gvfsjobseekread.c @@ +98,3 @@ + g_debug ("send_reply(%p), pos=%"G_GOFFSET_FORMAT", failed=%d (%s)\n", + job, op_job->final_offset, job->failed, job->failed?job->error->message:""); ditto for the rest
Thanks for the review. The spaces around ? and : weren't there before, but I've added them for better readability (also in gvfsjobdbus.c and gvfsjobenumerate.c). I've added also line breaks to avoid more then 80 characters per line. I've replaced the tabs by spaces. The tabs were added by mistake testing Gnome Builder... (Thanks to your review I've enabled whitespace coloring for git diff and reconfigured Gnome Builder to show tabs using gsettings) Pushed as commit 766b99b .