diff --git a/lib/winston/common.js b/lib/winston/common.js index d1af9491f..97f234426 100644 --- a/lib/winston/common.js +++ b/lib/winston/common.js @@ -219,6 +219,11 @@ exports.log = function (options) { // if (typeof options.formatter == 'function') { options.meta = meta || options.meta; + if (options.meta instanceof Error) { + // Force converting the Error to an plain object now so it + // will not be messed up by decycle() when cloning options + options.meta = exports.clone(options.meta); + } return String(options.formatter(exports.clone(options))); }