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

Got a error "data.map is not a function" when I custom a transport.file.format. #422

Open c0010c opened 5 months ago

c0010c commented 5 months ago

Version:5.1.5 Stack: Unhandled electron-log error TypeError: data.map is not a function at toString (D:\dev\webWS\game-rcsc-electron\node_modules\electron-log\src\node\transforms\object.js:63:33) at D:\dev\webWS\game-rcsc-electron\node_modules\electron-log\src\node\transforms\transform.js:15:14 at Array.reduce () at transform (D:\dev\webWS\game-rcsc-electron\node_modules\electron-log\src\node\transforms\transform.js:13:21) at transport (D:\dev\webWS\game-rcsc-electron\node_modules\electron-log\src\node\transports\file\index.js:74:21) at Logger.processMessage (D:\dev\webWS\game-rcsc-electron\node_modules\electron-log\src\core\Logger.js:173:11) at Logger.logData (D:\dev\webWS\game-rcsc-electron\node_modules\electron-log\src\core\Logger.js:129:10) at [as info] (D:\dev\webWS\game-rcsc-electron\node_modules\electron-log\src\core\Logger.js:83:37)

image

megahertz commented 5 months ago

Could you show your logger initialization code?