diff --git a/esp/scm/ws_logaccess.ecm b/esp/scm/ws_logaccess.ecm index dcc0388c46a..1ae9ad4be7c 100644 --- a/esp/scm/ws_logaccess.ecm +++ b/esp/scm/ws_logaccess.ecm @@ -87,12 +87,14 @@ ESPenum LogAccessFilterOperator : int * INF - Information * PRO - Progress * MET - Metric +* EVT - Event * *If searching by "ByTargetAudience", the SearchByValue should contain the 3 letter code associated with the target audience of interest. * valid values at time of writing are: * OPR - Operator * USR - User * PRO - Programmer +* MON - Monitor * ADT - Audit *If searching by "BySourceInstance", the SearchByValue should contain the instance of interest *If searching by "BySourceNode", the SearchByValue should contain the node of interest diff --git a/helm/examples/logging/README.md b/helm/examples/logging/README.md index 1a588e01822..6fac4eba03e 100644 --- a/helm/examples/logging/README.md +++ b/helm/examples/logging/README.md @@ -73,7 +73,7 @@ The logs can be filtered by TargetAudience, Category or Detail Level, and the ou ### Target Audience Filtering -The availble target audiences include operator(OPR), user(USR), programmer(PRO), audit(ADT), or all. The filter is controlled by the +The availble target audiences include operator(OPR), user(USR), programmer(PRO), monitor(MON), audit(ADT), or all. The filter is controlled by the `
`.logging.audiences value. The string value is comprised of 3 letter codes delimited by the aggregation operator (+) or the removal operator (-). For example, all component log output to include Programmer and User messages only: @@ -81,7 +81,7 @@ The availble target audiences include operator(OPR), user(USR), programmer(PRO), ### Target Category Filtering -The available target categories include disaster(DIS), error(ERR), warning(WRN),information(INF),progress(PRO),metrics(MET). The category (or class) filter is controlled by the `
`.logging.classes value, comprised of 3 letter codes delimited by the aggregation operator (+) or the removal operator (-). +The available target categories include disaster(DIS), error(ERR), warning(WRN),information(INF),progress(PRO),metrics(MET),event(EVT). The category (or class) filter is controlled by the `
`.logging.classes value, comprised of 3 letter codes delimited by the aggregation operator (+) or the removal operator (-). For example, the mydali instance's log output to include all classes except for progress: helm install myhpcc ./hpcc --set dali[0].logging.classes="ALL-PRO" --set dali[0].name="mydali" diff --git a/system/jlib/jexcept.cpp b/system/jlib/jexcept.cpp index 1273588d799..7168d2d85a9 100644 --- a/system/jlib/jexcept.cpp +++ b/system/jlib/jexcept.cpp @@ -302,6 +302,7 @@ const char* serializeMessageAudience(MessageAudience ma) case MSGAUD_operator: ret = "operator"; break; case MSGAUD_user: ret = "user"; break; case MSGAUD_programmer: ret = "programmer"; break; + case MSGAUD_monitor: ret = "monitor"; break; case MSGAUD_all: ret = "all"; break; default: ret = "unknown"; break; } @@ -319,6 +320,8 @@ MessageAudience deserializeMessageAudience(const char* text) ma = MSGAUD_user; else if (!strcmp(text, "programmer")) ma = MSGAUD_programmer; + else if (!strcmp(text, "monitor")) + ma = MSGAUD_monitor; else if (!strcmp(text, "all")) ma = MSGAUD_all; } diff --git a/system/jlib/jlog.hpp b/system/jlib/jlog.hpp index 64cb242e49c..d69e9f5d07a 100644 --- a/system/jlib/jlog.hpp +++ b/system/jlib/jlog.hpp @@ -68,7 +68,8 @@ typedef enum MSGCLS_metric = 0x20, // A metric line MSGCLS_addid = 0x40, // Internal use within log system MSGCLS_removeid = 0x80, // Internal use within log system - MSGCLS_all = 0xFF // Use as a filter to select all messages + MSGCLS_event = 0x100, // A timestamp or event where the time it occurs is significant + MSGCLS_all = 0xFFFF // Use as a filter to select all messages } LogMsgClass; /* ------------------------------------------------------------------------------------ * * NOTES: * @@ -141,6 +142,8 @@ inline const char * LogMsgAudienceToVarString(LogMsgAudience audience) return("User"); case MSGAUD_programmer: return("Programmer"); + case MSGAUD_monitor: + return("Monitor"); case MSGAUD_audit: return("Audit"); default: @@ -158,6 +161,8 @@ inline const char * LogMsgAudienceToFixString(LogMsgAudience audience) return("USR"); case MSGAUD_programmer: return("PRG"); + case MSGAUD_monitor: + return("MON"); case MSGAUD_audit: return("AUD"); default: @@ -172,6 +177,8 @@ inline MessageAudience LogMsgAudFromAbbrev(char const * abbrev) return MSGAUD_user; if(strnicmp(abbrev, "PRO", 3)==0) return MSGAUD_programmer; + if(strnicmp(abbrev, "MON", 3)==0) + return MSGAUD_monitor; if(strnicmp(abbrev, "ADT", 3)==0) return MSGAUD_audit; if(strnicmp(abbrev, "ALL", 3)==0) @@ -195,6 +202,8 @@ inline const char * LogMsgClassToVarString(LogMsgClass msgClass) return("Progress"); case MSGCLS_metric: return("Metric"); + case MSGCLS_event: + return("Event"); default: return("UNKNOWN"); } @@ -216,6 +225,8 @@ inline const char * LogMsgClassToFixString(LogMsgClass msgClass) return("PRO"); case MSGCLS_metric: return("MET"); + case MSGCLS_event: + return("EVT"); default: return("UNK"); } @@ -235,6 +246,8 @@ inline LogMsgClass LogMsgClassFromAbbrev(char const * abbrev) return MSGCLS_progress; if(strnicmp(abbrev, "MET", 3)==0) return MSGCLS_metric; + if(strnicmp(abbrev, "EVT", 3)==0) + return MSGCLS_event; if(strnicmp(abbrev, "ALL", 3)==0) return MSGCLS_all; return MSGCLS_unknown; diff --git a/system/jlib/jscm.hpp b/system/jlib/jscm.hpp index 6a08dbdca92..718d6f3a215 100644 --- a/system/jlib/jscm.hpp +++ b/system/jlib/jscm.hpp @@ -310,7 +310,8 @@ typedef enum // would not be resolvable by sysadmin or ECL developers. Additional information that may // be useful for improving the platform. MSGAUD_programmer = 0x20, - // MSGAUD_legacy = 0x40, REMOVED - may be reused later + // Target audience: Automatic monitoring tools + MSGAUD_monitor = 0x40, // Target audience: persons involved in accounting and security audits MSGAUD_audit = 0x80, // MSGAUD_all is to be used for filtering or specifying which messages are to be logged