Patent ID: 7467374

Claim:
In a computing environment, a method of logging tracing data into a consistent and structured output, the method comprising: providing public methods for implementing structured tracing comprising: XmlTracer which initializes a new instance of an XmlTracer class, GetHashCode which serves as a hash function for a particular type for use in hashing algorithms and data structures, GetType which gets the type of a current instance of a tracer object, Serialize which serializes the tracer object, and ToString which returns a string that represents the current tracer object; providing attributes used for controlling the way in which objects are serialized comprising: TraceIgnore for ignoring a particular field or property, TraceAsText for tracing a call to a ToString function instead of serializing, TraceTypeOnly for writing a type name only without data, TraceElement for using a specified tag name, TraceAsCollection for tracing a class as a collection, TraceNonPublic for tracing non-public class members, and TraceItemType for indicating if a particular collection contains only objects of a specified type; during the execution of a program to be traced, upon reaching a checkpoint, outputting data corresponding to the data of an object; receiving the data corresponding to data of an object; accessing a visited object table to determine if the object has previously been visited; when an object has not been previously visited, tracking the object in the visited object table; determining the data type by accessing metadata via reflection classes; when the data comprises a simple type, serializing the data into a structure based on the attributes by outputting a tag corresponding to the type and inserting a value for that type in association with the tag; and when the data comprises a complex type, serializing each member of the complex type; and writing the serialized data to a storage media.