diff --git a/packages/mitmproxy/src/json.js b/packages/mitmproxy/src/json.js index cf0a230..a16fae3 100644 --- a/packages/mitmproxy/src/json.js +++ b/packages/mitmproxy/src/json.js @@ -1,4 +1,5 @@ let JSON5 = require('json5') +const log = require('util/util.log') if (JSON5.default) { JSON5 = JSON5.default } @@ -14,6 +15,7 @@ module.exports = { try { return JSON5.stringify(obj) } catch (e) { + log.warn('转换为JSON字符串失败, error:', e, ', obj:', obj) return obj.toString() } }