When developing a protocol and when incorporating Error Log Levels into your protocol design, does anyone have a standard they follow?
I'm thinking more generic or high level guidelines as I am curious if a rough framework would be nice to help set customer/user expectations when using the logging levels. Currently it varies by protocol, maybe no logging was integrated at all and/or only uses level 1 for everything, etc.
Assumptions:
- Its assumed each level contains the logging of the lower level. i.e. 2 = 1 & 2 or 4 = 1 through 4
Example Only
Let's take Information Logging
- Level 1
- Summary of a QAction Results
- Level 2
- Intra-element conversations
- Level 3
- Parsing of files i.e. xml, csv, etc that might be used in the protocol during input/output operations.
- Level 4
- ?
- Level 5
- Everything
Hi Shawn, this is actually a very good question. Logging is very important to be able to quickly pinpoint the problem when something goes wrong.
Your assumption that each level contains the lower level is correct.
Currently we don't really have guidlines that specify what should be logged on which log level. I also think it's not easy to setup strict guidelines that are perfect in all situations, it's really depending on the connector itself. For instance, in your example, priority is given to intra-element communication, but it could be that in another connector you first want to see the parsing of the data and inter-element communication in a higher level. For performance reasons, it's important that at the default level as less as possible is being logged (only errors).
Next to the levels, it's also important to specify the correct type of the logging: information, debug, error.
Thanks Tom for taking the time to respond! Will check with the domain and expert hub and see if there is any value to some loose guidelines. We had a customer ask for all their connectors what each level represents or what they can expect to see, this was following our log cleanup and building out the levels of 1 protocol but prompted me to look at this more wholistically and see how we can improve.
Hi Shawn
I notice that the different levels aren’t used as much for protocol development because your logs easily get lost between the additional SLProtocol logs that are added.