From 4dc75687e2a1a02c9fefbdf29eaac16d7e97f92c Mon Sep 17 00:00:00 2001 From: lrrajesh Date: Wed, 18 Mar 2015 13:55:03 -0700 Subject: [PATCH] Notification msg add severity to the output --- orte/mca/notifier/base/notifier_base_fns.c | 6 +++--- orte/mca/notifier/syslog/notifier_syslog_module.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/orte/mca/notifier/base/notifier_base_fns.c b/orte/mca/notifier/base/notifier_base_fns.c index fe7e74b1836..0f4ec5c8b4a 100644 --- a/orte/mca/notifier/base/notifier_base_fns.c +++ b/orte/mca/notifier/base/notifier_base_fns.c @@ -142,11 +142,11 @@ void orte_notifier_base_report(int sd, short args, void *cbdata) const char* orte_notifier_base_sev2str(orte_notifier_severity_t severity) { switch (severity) { - case ORTE_NOTIFIER_EMERG: return "EMERG"; break; + case ORTE_NOTIFIER_EMERG: return "EMERGENCY"; break; case ORTE_NOTIFIER_ALERT: return "ALERT"; break; - case ORTE_NOTIFIER_CRIT: return "CRIT"; break; + case ORTE_NOTIFIER_CRIT: return "CRITICAL"; break; case ORTE_NOTIFIER_ERROR: return "ERROR"; break; - case ORTE_NOTIFIER_WARN: return "WARN"; break; + case ORTE_NOTIFIER_WARN: return "WARNING"; break; case ORTE_NOTIFIER_NOTICE: return "NOTICE"; break; case ORTE_NOTIFIER_INFO: return "INFO"; break; case ORTE_NOTIFIER_DEBUG: return "DEBUG"; break; diff --git a/orte/mca/notifier/syslog/notifier_syslog_module.c b/orte/mca/notifier/syslog/notifier_syslog_module.c index be1d34def31..7ad683317fd 100644 --- a/orte/mca/notifier/syslog/notifier_syslog_module.c +++ b/orte/mca/notifier/syslog/notifier_syslog_module.c @@ -85,8 +85,9 @@ static void mylog(orte_notifier_request_t *req) /* trim the newline */ tod[strlen(tod)] = '\0'; - syslog(req->severity, "[%s]%s JOBID %s REPORTS ERROR %s: %s", tod, + syslog(req->severity, "[%s]%s %s: JOBID %s REPORTS ERROR %s: %s", tod, ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), + orte_notifier_base_sev2str(req->severity), ORTE_JOBID_PRINT(req->jdata->jobid), orte_job_state_to_str(req->state), (NULL == req->msg) ? "" : req->msg); @@ -104,8 +105,9 @@ static void myevent(orte_notifier_request_t *req) /* trim the newline */ tod[strlen(tod)] = '\0'; - syslog(req->severity, "[%s]%s SET EVENT : %s", tod, + syslog(req->severity, "[%s]%s %s SYSTEM EVENT : %s", tod, ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), + orte_notifier_base_sev2str(req->severity), (NULL == req->msg) ? "" : req->msg); }