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

LogObject Hierarchy


How many levels in the object graph does this method go?

Also, if I have an Order object with a collection of OrderItems as a property, will the console viewer provide a drill-down view of that hierarchy and will that object graph be logged in a log file?



Hi Chad,

The viewer used for objects in the Console doesn’t currently support nested properties/objects, so only the first level of properties would be logged. So for the OrderItems property, for example, you would need to log those objects in a loop yourself. You could write your own log method though to automate this for different types that you work with.