Dump entire object to log?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dump entire object to log?

tempid
Is it possible to dump an entire object to log in XML format?
e.g. I have a Person with several properties and sub-properties. When I do a logger.Trace(person), I want to see the entire details of the object. Is it possible?

Also is Trace > Debug > Info > Warn > Error > Fatal in terms of verbosity? If I say minLevel of Fatal, will it include Fatal and all the way upto Trace? What's the order? How do I log EVERYTHING?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Dump entire object to log?

Jason LaFlair
Administrator
To answer your verbosity question - it's just the reverse of what you have:

Trace < Debug < Info < Warn < Error < Fatal

So if you say minLevel="Info" - you'll see Info, Warn, Error, Fatal.

To get 'everything' - just set minLevel="Trace"