diff options
author | Alon Levy <alevy@redhat.com> | 2011-11-06 16:09:35 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-11-07 10:29:32 +0200 |
commit | af77bb577d21215167d388f908584d797cc3c303 (patch) | |
tree | 1de9f4a330d6b219404cf77a8627dd94110994c8 /common | |
parent | d5274eeef63872e6b3e0f4db6e1b2dbfcdf5580f (diff) | |
download | spice-af77bb577d21215167d388f908584d797cc3c303.tar.gz spice-af77bb577d21215167d388f908584d797cc3c303.tar.xz spice-af77bb577d21215167d388f908584d797cc3c303.zip |
server: add prefix argument to red_printf_debug
printed before function name. No central location for prefixes.
Adding "WORKER", "ASYNC", "MAIN" since those were the current users.
Diffstat (limited to 'common')
-rw-r--r-- | common/spice_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/spice_common.h b/common/spice_common.h index f6205a33..d13a94fd 100644 --- a/common/spice_common.h +++ b/common/spice_common.h @@ -65,13 +65,13 @@ } \ } while (0) -#define red_printf_debug(debug, format, ...) do { \ +#define red_printf_debug(debug, prefix, format, ...) do { \ static int debug_level = -1; \ if (debug_level == -1) { \ debug_level = getenv("SPICE_DEBUG_LEVEL") != NULL ? atoi(getenv("SPICE_DEBUG_LEVEL")) : 0; \ } \ if (debug <= debug_level) { \ - printf("%s: " format "\n", __FUNCTION__, ## __VA_ARGS__ ); \ + printf("%s: %s: " format "\n", prefix, __FUNCTION__, ## __VA_ARGS__ ); \ } \ } while(0) |