Log objects and arrays correctly