Avoid unnecessary memory allocation while logging via log4cpp log4cpp.getInstance method takes in std::string argument. Wven the caller passes in const char *, a std::string instance is created. Changed code to pass std::string object from all callers to avoid memory allocation from system heap
The file name format is: <file-prefix>.<timestamp>.<hostname>[.<nid].<pid>.log The monitor process does not have a <pnid> when the logging object is created and <nid> does not apply. The primitive processes follow the same filename pattern except that they use the .<nid> in the file name.
"Node Number: <pnid>,, PIN: <pid> , Process Name: <process-name>,,, TID: <thread-id>, Message ID: <message-id>, <message-string>" - Notice the absence of 'CPU:' since it does not apply to the monitor. - <process-name> also does not apply, but the string '$MONITOR' stands out. However, the string is the same in every node, but the 'Node Number: <pnid>' indicates which physical node.
The message formats add: - the <thread-id> which has been useful for debugging problems - the <message-id> which is a unique identifier of each messages generated. The number takes you to a specific source code location where the message is generated.