Over the weekend I spent a little more time on the FDMEE framework, while implementing some new logging functionality I felt compelled to look into the Python Style Guide (PEP 8) and realized while my new logging code seemed to be in line with guide, our property names were not. With a big part of the reason writing this being to adhere to best practices, I felt we had to make a change. Functionality wise nothing is different but we removed the camel casing of properties and replaced it with underscores and all lowercase letters. Below is a table of all the properties that changed and what they are now.
Ok with that out of the way let's talk about the new stuff. Francisco recently released his snippet for logging the fdmContext, I had never considered writing a whole jython dictionary to the log. So we expanded on this idea a little bit and built a generic object parser that also happens to work for the fdmContext. Now the context can be written to the log by calling
jf.log.context() and any other dictionary variable can be logged by calling
fdmAPI.logDebug(jf.log.object(dictionary)). Last there are additional formatting options that can be passed to the object method if you have a particular display requirements; the default format separates the key from the value with a colon (:) and tab and each pair is on a line by itself.
Well that's probably it for this week, Happy Thanksgiving.