From 4e283b7dffb64ed3ad1b4342d374724cdab81312 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Mon, 26 Feb 2007 14:52:53 +0000 Subject: [PATCH] better looking outputs --- org.glite.lb.client/examples/job_status.c | 3 ++- org.glite.lb.server/src/process_event_pbs.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/org.glite.lb.client/examples/job_status.c b/org.glite.lb.client/examples/job_status.c index b8c1581..a0e614a 100644 --- a/org.glite.lb.client/examples/job_status.c +++ b/org.glite.lb.client/examples/job_status.c @@ -292,7 +292,8 @@ static void printstat(edg_wll_JobStat stat, int level) printf("%spbs_dest_host : %s\n", ind, stat.pbs_dest_host); printf("%spbs_pid : %d\n", ind, stat.pbs_pid); printf("%spbs_exit_status : %d\n", ind, stat.pbs_exit_status); - printf("%spbs_error_desc : %s\n", ind, stat.pbs_error_desc); + printf("%spbs_error_desc : %s%s\n", ind, + (stat.pbs_error_desc) ? "\n" : "", stat.pbs_error_desc); } printf("\n"); diff --git a/org.glite.lb.server/src/process_event_pbs.c b/org.glite.lb.server/src/process_event_pbs.c index c703756..858d611 100644 --- a/org.glite.lb.server/src/process_event_pbs.c +++ b/org.glite.lb.server/src/process_event_pbs.c @@ -49,8 +49,6 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c res = RET_LATE; } - printf("processEvent_PBS(): %s, %s\n\t %s, old_state=%s, ", edg_wll_EventToString(e->any.type), e->any.seqcode, (res == RET_LATE) ? "RET_LATE" : "RET_OK", edg_wll_StatToString(old_state)); - switch (e->any.type) { case EDG_WLL_EVENT_REGJOB: if (USABLE(res)) { @@ -155,7 +153,7 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c if (USABLE_DATA(res)) { char *new_error_desc; - asprintf(&new_error_desc,"%s%s%s", + asprintf(&new_error_desc,"%s%s\t%s", (js->pub.pbs_error_desc) ? js->pub.pbs_error_desc : "", (js->pub.pbs_error_desc) ? "\n" : "", e->PBSError.error_desc); @@ -169,6 +167,18 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c break; } +/* XXX : just debug output - remove */ + + printf("processEvent_PBS(): %s (%s), state: %s --> %s\n ", + edg_wll_EventToString(e->any.type), + (res == RET_LATE) ? "RET_LATE" : "RET_OK", + edg_wll_StatToString(old_state), + edg_wll_StatToString(js->pub.state) ); + printf("\t%s\n",e->any.seqcode); + printf("\t(last=%s)\n",js->last_seqcode); + +/*----------------------------------*/ + if (USABLE(res)) { rep(js->last_seqcode, e->any.seqcode); @@ -181,7 +191,6 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c } if (! js->pub.location) js->pub.location = strdup("this is PBS"); - printf("new_state=%s\n", edg_wll_StatToString(js->pub.state)); return RET_OK; } -- 1.8.2.3