summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authoralexyu@google.com <alexyu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 23:22:40 +0000
committeralexyu@google.com <alexyu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 23:22:40 +0000
commit6075da4aecf7073f270cc0dd1306cc57b102671b (patch)
tree982ecb9ad80d1c8642bf87c37b965f225aa31f34 /printing
parent65fd16aadafd257320a6fcf6945e252b117a9c3c (diff)
downloadchromium_src-6075da4aecf7073f270cc0dd1306cc57b102671b.zip
chromium_src-6075da4aecf7073f270cc0dd1306cc57b102671b.tar.gz
chromium_src-6075da4aecf7073f270cc0dd1306cc57b102671b.tar.bz2
Standardize log message style for cloudprint service and display printer id
and job id wherever possible BUG=138602 TEST= Review URL: https://chromiumcodereview.appspot.com/10808086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/backend/print_backend_cups.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc
index db606c8..d0d8abb 100644
--- a/printing/backend/print_backend_cups.cc
+++ b/printing/backend/print_backend_cups.cc
@@ -146,10 +146,9 @@ bool PrintBackendCUPS::EnumeratePrinters(PrinterList* printer_list) {
cups_dest_t* destinations = NULL;
int num_dests = GetDests(&destinations);
if ((num_dests == 0) && (cupsLastError() > IPP_OK_EVENTS_COMPLETE)) {
- VLOG(1) << "CP_CUPS: Error getting printers from CUPS server. Server: "
- << print_server_url_
- << " Error: "
- << static_cast<int>(cupsLastError());
+ VLOG(1) << "CUPS: Error getting printers from CUPS server"
+ << ", server: " << print_server_url_
+ << ", error: " << static_cast<int>(cupsLastError());
return false;
}
@@ -197,7 +196,9 @@ bool PrintBackendCUPS::EnumeratePrinters(PrinterList* printer_list) {
cupsFreeDests(num_dests, destinations);
- VLOG(1) << "CUPS: Enumerated " << printer_list->size() << " printers.";
+ VLOG(1) << "CUPS: Enumerated printers"
+ << ", server: " << print_server_url_
+ << ", # of printers: " << printer_list->size();
return true;
}
@@ -214,12 +215,14 @@ bool PrintBackendCUPS::GetPrinterCapsAndDefaults(
PrinterCapsAndDefaults* printer_info) {
DCHECK(printer_info);
- VLOG(1) << "CUPS: Getting Caps and Defaults for: " << printer_name;
+ VLOG(1) << "CUPS: Getting caps and defaults"
+ << ", printer name: " << printer_name;
FilePath ppd_path(GetPPD(printer_name.c_str()));
// In some cases CUPS failed to get ppd file.
if (ppd_path.empty()) {
- LOG(ERROR) << "CUPS: Failed to get PPD for: " << printer_name;
+ LOG(ERROR) << "CUPS: Failed to get PPD"
+ << ", printer name: " << printer_name;
return false;
}
@@ -344,7 +347,8 @@ FilePath PrintBackendCUPS::GetPPD(const char* name) {
ipp_status_t error_code = cupsLastError();
int http_error = httpError(http.http());
if (error_code > IPP_OK_EVENTS_COMPLETE || http_error != 0) {
- LOG(ERROR) << "Error downloading PPD file for: " << name
+ LOG(ERROR) << "Error downloading PPD file"
+ << ", name: " << name
<< ", CUPS error: " << static_cast<int>(error_code)
<< ", HTTP error: " << http_error;
file_util::Delete(ppd_path, false);