0

A very generic question; in the context of a programmer, with operational aspect of the process (program) in mind.

Is there any sort of best-practice / guide to classify messages, particularly in the context of SaaS / multi-tenancy (server) software environment, which would be generating errors and warnings due to user actions or misconfiguration. Due to the nature of the software, most modules that I am having to deal with, are stateless; i.e when an error happens due to user-error, it is quite hard to distinguish between that and an operational error (like network misconfiguration, etc).

What I want to know is from some of you experienced folks; what is the sensible logic to be employed here, in order to make it easy for the operations boys/girls to classify these messages, and identify problems?

PS: Sorry to those who have seen this being cross-posted; from here

CodeMedic
  • 304
  • 1
  • 2
  • 11
  • Cross posting is not allowed on the stack exchange network: meta.stackoverflow.com/q/64068/85514 Maybe you should remove one of your questions? – Peter Smit Feb 17 '12 at 12:41

1 Answers1

1

Most *nix processes log to syslog (or should at least) using a semi-standard format "Month Day 24H-Time host process_name[pid]: message". Syslog incorporates ways to indicate the message's severity, use them (though keep in mind that the severity is from the system's prospective, not the applications).

If message is a debugging problem then it's usually "Function_Name File_Name Line_No Error_Code Error_Desc"; otherwise the format of the message is entirely program dependent.

For multi-tenant systems it's pretty common for the "message" part to start with some form of tenant identification, followed by the actual log message.

Chris S
  • 77,945
  • 11
  • 124
  • 216