megahertz / electron-log

Simple logging module Electron/Node.js/NW.js application. No dependencies. No complicated configuration.
MIT License
1.32k stars 128 forks source link

Don't call toJSON automatically when serializing an object #319

Closed megahertz closed 1 year ago

megahertz commented 2 years ago

Discussed in https://github.com/megahertz/electron-log/discussions/318

Originally posted by **frifrafry** September 2, 2022 I couldn't get electron-log working with electron-vue, as I was always running into: `[Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.` In the end I solved this via setting up a simple default implementation: `Vue.prototype.toJSON = function () { return 'toJSON not defined' } ` Any thoughts on this? Is there a better way to solve this?