public static void LogObjectDump(object theObject, string objectName, string source = "") { const int objectDepth = 5; string objectDump = ObjectDumper.GetObjectDump(theObject, objectDepth); string prefix = string.Format(CultureInfo.CurrentCulture, "{0} object dump:{1}", objectName, Environment.NewLine); Log(prefix + objectDump, EventLogEntryType.Warning, source); }