Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Logging and doing math (Reporting)


For example when a method is called, we wan to log. Info such as method name, the length of time method ran etc. Using PostSharp and SmartInspect this task is easy. My question is how do you parse the log.

One option is to parse the log, pump it into a data base and run analytical. Is their a better way.



I am using SiAuto.Main.Watch but need some thing more then that.

Any one wrote a JSON exporter ? I can just use the XML and translate to JSON and then pump it into Mongo DB



Hello Jay,

Thanks for your posting. We actually have a .NET SDK on our website that you can use to load and process SmartInspect log files from your .NET code. So you could write a simple tool to iterate through the log packets and store the data in a database or similar:

(See the SmartInspect SDK and SmartInspect Resource Kit at the bottom of that page).

Another option would be to export the data to XML via the Console (see File | Export Log) and then use this as a starting point for your data analysis.

I hope this helps. Let us know if you more questions about this.



Thanks Dennis. I got the SDK but is their a simple example. Also LogEntry, ProcessFlow, Watch, these have different data formats ?

What I need to do is, read the Packet, map each packet to a Class and then store it in the database using ORM tool like NH



Hello Jay,

The SmartInspect Resource Kit (also available on the above mentioned page) contains examples on how to use the SDK. The different packet types you mentioned have their own structure and you can simply cast the packet objects to their respective types (which are used from the SmartInspect library itself).

I hope this helps.