The Samba-Bugzilla – Attachment 10859 Details for
Bug 11158
Enhance log messages by prefixing with variable name, etc. and add a few more log calls.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Enhance log message by adding variable prefix, etc.
0005-Enhance-log-message-add-prefix-var.-name-and-a-few-a.patch (text/plain), 3.83 KB, created by
ishikawa
on 2015-03-11 16:01:29 UTC
(
hide
)
Description:
Enhance log message by adding variable prefix, etc.
Filename:
MIME Type:
Creator:
ishikawa
Created:
2015-03-11 16:01:29 UTC
Size:
3.83 KB
patch
obsolete
>From fde4b10dc1c8c600d908acc57165b6531f6465d6 Mon Sep 17 00:00:00 2001 >From: Chiaki ISHIKAWA <ishikawa@yk.rim.or.jp> >Date: Tue, 10 Mar 2015 22:11:16 +0900 >Subject: [PATCH 5/8] Enhance log message: add prefix (var. name) and a few > additions. > >--- > ccache.c | 22 ++++++++++++++-------- > 1 file changed, 14 insertions(+), 8 deletions(-) > >diff --git a/ccache.c b/ccache.c >index 65e376a..02a0d76 100644 >--- a/ccache.c >+++ b/ccache.c >@@ -790,6 +790,7 @@ to_cache(struct args *args) > args_add(args, output_obj); > > if (output_dia) { >+ cc_log("(output_dia) Outputting to final destination: %s", output_dia); > args_add(args, "--serialize-diagnostics"); > args_add(args, output_dia); > } >@@ -884,17 +885,18 @@ to_cache(struct args *args) > exit(status); > } > >+ cc_log("verbose: (tmp_stderr) %s being removed", tmp_stderr); > tmp_unlink(tmp_stderr); > failed(); > } > > if (stat(output_obj, &st) != 0) { >- cc_log("Compiler didn't produce an object file"); >+ cc_log("(output_obj) Compiler didn't produce an object file"); > stats_update(STATS_NOOUTPUT); > failed(); > } > if (st.st_size == 0) { >- cc_log("Compiler produced an empty object file"); >+ cc_log("(output_obj) Compiler produced an empty object file"); > stats_update(STATS_EMPTYOUTPUT); > failed(); > } >@@ -913,7 +915,7 @@ to_cache(struct args *args) > stats_update(STATS_ERROR); > failed(); > } >- cc_log("Stored in cache: %s", cached_stderr); >+ cc_log("(cached_stderr) Stored in cache: %s", cached_stderr); > if (conf->compression) { > /* > * The file was compressed, so obtain the compressed >@@ -941,12 +943,13 @@ to_cache(struct args *args) > > if (output_dia) { > if (stat(output_dia, &st) != 0) { >- cc_log("Failed to stat %s: %s", output_dia, strerror(errno)); >+ cc_log("(output_dia) Failed to stat %s: %s", output_dia, strerror(errno)); > stats_update(STATS_ERROR); > failed(); > } > if (st.st_size > 0) { > put_file_in_cache(output_dia, cached_dia); >+ cc_log("(cached_dia) Stored in cache: %s", cached_dia); > } > } > >@@ -1495,13 +1498,13 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) > > /* Check if the object file is there. */ > if (stat(cached_obj, &st) != 0) { >- cc_log("Object file %s not in cache", cached_obj); >+ cc_log("(cached_obj) Object file %s not in cache", cached_obj); > return; > } > > /* Check if the diagnostic file is there. */ > if (output_dia && stat(cached_dia, &st) != 0) { >- cc_log("Diagnostic file %s not in cache", cached_dia); >+ cc_log("(cached_dia) Diagnostic file %s not in cache", cached_dia); > return; > } > >@@ -1510,7 +1513,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) > * meta-data with no content. Catch an easy case of this. > */ > if (st.st_size == 0) { >- cc_log("Invalid (empty) object file %s in cache", cached_obj); >+ cc_log("(cached_obj) Invalid (empty) object file %s in cache", cached_obj); > x_unlink(cached_obj); > return; > } >@@ -1529,12 +1532,15 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) > > if (!str_eq(output_obj, "/dev/null")) { > get_file_from_cache(cached_obj, output_obj); >+ cc_log("Created (output_obj) %s from (cached_obj) %s", output_obj, cached_obj); > } > if (produce_dep_file) { > get_file_from_cache(cached_dep, output_dep); >+ cc_log("Created (output_dep) %s from (cached_dep) %s", output_dep, cached_dep); > } > if (output_dia) { > get_file_from_cache(cached_dia, output_dia); >+ cc_log("Created (output_dia) %s from (cached_dia) %s", output_dia, cached_dia); > } > > /* Update modification timestamps to save files from LRU cleanup. >@@ -2658,7 +2664,7 @@ ccache(int argc, char *argv[]) > if (output_dia) { > cc_log("Diagnostic file: %s", output_dia); > } >- cc_log("Object file: %s", output_obj); >+ cc_log("(output_obj) Object file: %s", output_obj); > > hash_start(&common_hash); > calculate_common_hash(preprocessor_args, &common_hash); >-- >2.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11158
: 10859