Commit 821b74fb authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r6969] Improve debug messages a bit to point out what the PGID and proxy ID

of each proxy is.
parent 0855991f
......@@ -11,7 +11,6 @@
#include "bind.h"
struct HYD_pmcd_pmip HYD_pmcd_pmip;
char *HYD_dbg_prefix = (char *) "unknown";
static HYD_status init_params(void)
{
......@@ -176,7 +175,7 @@ int main(int argc, char **argv)
enum HYD_pmcd_pmi_cmd cmd;
HYD_status status = HYD_SUCCESS;
status = HYDU_dbg_init("proxy");
status = HYDU_dbg_init("proxy:unset");
HYDU_ERR_POP(status, "unable to initialization debugging\n");
status = HYDU_set_signal(SIGPIPE, signal_cb);
......
......@@ -429,6 +429,7 @@ struct HYD_arg_match_table HYD_pmcd_pmip_match_table[] = {
HYD_status HYD_pmcd_pmip_get_params(char **t_argv)
{
char **argv = t_argv;
static char dbg_prefix[2 * MAX_HOSTNAME_LEN];
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
......@@ -477,6 +478,12 @@ HYD_status HYD_pmcd_pmip_get_params(char **t_argv)
if (HYD_pmcd_pmip.local.pgid == -1)
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "PG ID not available\n");
HYDU_dbg_finalize();
HYDU_snprintf(dbg_prefix, 2 * MAX_HOSTNAME_LEN, "proxy:%d:%d",
HYD_pmcd_pmip.local.pgid, HYD_pmcd_pmip.local.id);
status = HYDU_dbg_init((const char *) dbg_prefix);
HYDU_ERR_POP(status, "unable to initialization debugging\n");
fn_exit:
HYDU_FUNC_EXIT();
return status;
......
......@@ -8,7 +8,6 @@
#include "hydra_utils.h"
#include "persist_server.h"
char *HYD_dbg_prefix = (char *) "unknown";
struct HYDT_persist_handle HYDT_persist_handle;
static struct {
enum {
......
......@@ -15,7 +15,6 @@ struct HYDT_ns_publish {
};
static struct HYDT_ns_publish *publish_list = NULL;
char *HYD_dbg_prefix = (char *) "unknown";
static struct {
int port;
......
......@@ -15,7 +15,6 @@
struct HYD_handle HYD_handle = { {0} };
struct HYD_exec *HYD_uii_mpx_exec_list = NULL;
char *HYD_dbg_prefix = (char *) "unknown";
static void usage(void)
{
......
......@@ -6,6 +6,8 @@
#include "hydra_utils.h"
char *HYD_dbg_prefix = (char *) "unknown";
HYD_status HYDU_dbg_init(const char *str)
{
char hostname[MAX_HOSTNAME_LEN];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment