📄 logmon.rxl
字号:
when RL_lvl = "00000000000000000000000000000001" then RL_type = "Fatal" when RL_lvl = "00000000000000000000000000000010" then RL_type = "Error" when RL_lvl = "00000000000000000000000000000100" then RL_type = "Warning" when RL_lvl = "00000000000000000000000000001000" then RL_type = "Info" when RL_lvl = "00000000000000000000000000010000" then RL_type = "Trace" when RL_lvl = "00000000000000000000000000100000" then RL_type = "Trace2" when RL_lvl = "00000000000000000000000001000000" then RL_type = "Trace3" when RL_lvl = "00000000000000000000000010000000" then RL_type = "Debug" when RL_lvl = "00000000000000000000000100000000" then RL_type = "Debug2" when RL_lvl = "00000000000000000000001000000000" then RL_type = "Debug3" when RL_lvl = "00000000000000000000010000000000" then RL_type = "Start" when RL_lvl = "00000000000000000000100000000000" then RL_type = "Stop" when RL_lvl = "00000000000000000001000000000000" then RL_type = "Pass" when RL_lvl = "00000000000000000010000000000000" then RL_type = "Fail" when RL_lvl = "00000000000000000100000000000000" then RL_type = "Status" when RL_lvl = "00000000000000001000000000000000" then RL_type = "Reserved1" when RL_lvl = "00000000000000010000000000000000" then RL_type = "Reserved2" when RL_lvl = "00000000000000100000000000000000" then RL_type = "Reserved3" when RL_lvl = "00000000000001000000000000000000" then RL_type = "Reserved4" when RL_lvl = "00000000000010000000000000000000" then RL_type = "Reserved5" when RL_lvl = "00000000000100000000000000000000" then RL_type = "Reserved6" when RL_lvl = "00000000001000000000000000000000" then RL_type = "Reserved7" when RL_lvl = "00000000010000000000000000000000" then RL_type = "Reserved8" when RL_lvl = "00000000100000000000000000000000" then RL_type = "Reserved9" when RL_lvl = "00000001000000000000000000000000" then RL_type = "User1" when RL_lvl = "00000010000000000000000000000000" then RL_type = "User2" when RL_lvl = "00000100000000000000000000000000" then RL_type = "User3" when RL_lvl = "00001000000000000000000000000000" then RL_type = "User4" when RL_lvl = "00010000000000000000000000000000" then RL_type = "User5" when RL_lvl = "00100000000000000000000000000000" then RL_type = "User6" when RL_lvl = "01000000000000000000000000000000" then RL_type = "User7" when RL_lvl = "10000000000000000000000000000000" then RL_type = "User8" otherwise RL_type = "Unknown" endRETURN RL_type#End/******************************************************************************//* ResolveVariable - Resolve a variable via STAFProc. *//* Arguments: variable to resolve *//* Returns : resolved or original variable *//******************************************************************************/#Function ResolveVariableResolveVariable: PROCEDURE EXPOSE STAFHandle thisMachine , clientMachine origHandle parse arg var /* Determine if resolution is required if a "{" is found */ if POS("{", var) > 0 then do type = "RESOLVE STRING" STAFRC = STAFSubmit("LOCAL", "VAR", type STAFWrapData(var)) if STAFRC = 0 then var = STAFResult endRETURN var#End/******************************************************************************//* ExpandLevel - Returns a 32 bit string of data that represents the level. *//* Arguments: desc *//* Returns : level *//******************************************************************************/#Function ExpandLevelExpandLevel: procedure parse upper arg EL_desc select when EL_desc = "FATAL" then EL_level = "00000000000000000000000000000001" when EL_desc = "ERROR" then EL_level = "00000000000000000000000000000010" when EL_desc = "WARNING" then EL_level = "00000000000000000000000000000100" when EL_desc = "INFO" then EL_level = "00000000000000000000000000001000" when EL_desc = "TRACE" then EL_level = "00000000000000000000000000010000" when EL_desc = "TRACE2" then EL_level = "00000000000000000000000000100000" when EL_desc = "TRACE3" then EL_level = "00000000000000000000000001000000" when EL_desc = "DEBUG" then EL_level = "00000000000000000000000010000000" when EL_desc = "DEBUG2" then EL_level = "00000000000000000000000100000000" when EL_desc = "DEBUG3" then EL_level = "00000000000000000000001000000000" when EL_desc = "START" then EL_level = "00000000000000000000010000000000" when EL_desc = "STOP" then EL_level = "00000000000000000000100000000000" when EL_desc = "PASS" then EL_level = "00000000000000000001000000000000" when EL_desc = "FAIL" then EL_level = "00000000000000000010000000000000" when EL_desc = "STATUS" then EL_level = "00000000000000000100000000000000" /* Reserved Range - 9 total */ /* --- add new levels here */ /* User Range - 8 total */ when EL_desc = "USER1" then EL_level = "00000001000000000000000000000000" when EL_desc = "USER2" then EL_level = "00000010000000000000000000000000" when EL_desc = "USER3" then EL_level = "00000100000000000000000000000000" when EL_desc = "USER4" then EL_level = "00001000000000000000000000000000" when EL_desc = "USER5" then EL_level = "00010000000000000000000000000000" when EL_desc = "USER6" then EL_level = "00100000000000000000000000000000" when EL_desc = "USER7" then EL_level = "01000000000000000000000000000000" when EL_desc = "USER8" then EL_level = "10000000000000000000000000000000" otherwise EL_level = EL_desc endRETURN EL_level#End/******************************************************************************//* ConvertSeconds - Convert seconds past midmight to HH:MM:SS format. *//* Arguments: seconds *//* Returns : HH:MM:SS *//******************************************************************************/#Function ConvertSecondsConvertSeconds: parse arg CS_ltime if CS_ltime >= 3600 then do CS_hour = trunc(CS_ltime / 3600) CS_ltime = CS_ltime - (CS_hour * 3600) end else CS_hour = 0 if CS_ltime >= 60 then do CS_minute = trunc(CS_ltime / 60) CS_ltime = CS_ltime - (CS_minute * 60) end else CS_minute = 0 CS_second = CS_ltimeRETURN right(CS_hour,2,0)":"right(CS_minute,2,0)":"right(CS_second,2,0)#End/******************************************************************************//* InitializeLogOption - Setup the parser for the log message option. *//* Arguments: none *//* Returns : none *//******************************************************************************/#Function InitializeLogOptionInitializeLogOption: call AddOption "LOG", 1, "NO" call AddOption "GLOBAL", 1, "NO" call AddOption "MACHINE", 1, "NO" call AddOption "HANDLE", 1, "NO" call AddOption "RESOLVEMESSAGE", 1, "NO" call AddOption "NORESOLVEMESSAGE", 1, "NO" call AddOptionGroup "RESOLVEMESSAGE NORESOLVEMESSAGE", 0, 1 call AddOptionGroup "GLOBAL MACHINE HANDLE", 1, 1 call AddOption "LOGNAME", 1, "YES" call AddOptionNeed "LOG", "LOGNAME" call AddOption "LEVEL", 1, "YES" call AddOptionNeed "LOG", "LEVEL" call AddOption "MESSAGE", 1, "YES" call AddOptionNeed "LOG", "MESSAGE"RETURN#End/****************************************************************************//* DisplayOldVarErrorMessage - Displays an error message concerning the use *//* of old-style variables *//* *//* Accepts: The short name of the variable *//* The default value of the variable *//* Returns: 0 *//****************************************************************************/#Function DisplayOldVarErrorMessageDisplayOldVarErrorMessage: PROCEDURE EXPOSE me oldme serviceName parse arg varName, default say serviceName "Warning: Variable" oldMe || varName "no longer supported,", "defaulted to" default || ". Use variable" me || varName"."RETURN 0#End
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -