lib/react/server_rendering/bundle_renderer/console_polyfill.js (6 lines of code) (raw):

var console = { history: [] }; ['error', 'log', 'info', 'warn'].forEach(function (fn) { console[fn] = function () { console.history.push({level: fn, arguments: Array.prototype.slice.call(arguments)}); }; });