util.inspect(obj) but it doesn't seem to stringify the same way as console.log(obj);, not by default, at least. How do I get a string in the same format as console.log(obj); would print? I'm asking because I'm using a logger (winston.js) and I want it to print objects this way.