maidsafe-archive / safe_examples

examples showcasing various features of the SAFE Network
BSD 3-Clause "New" or "Revised" License
82 stars 50 forks source link

feat/logging: MAID-2477 email app - file output log plus UI update to… #369

Closed hunterlester closed 5 years ago

hunterlester commented 6 years ago

… see logs

maidsafe-highfive commented 6 years ago

r? @krishnaIndia

(maidsafe_highfive has picked a reviewer for you, use r? to override)

bochaco commented 6 years ago

Also, when I run the email app, the authorisation is sent, then if I open the log from the "File -> Open log file" menu, I don't get to see the logs, it just says Application not initialised. Then if I hit the back button in that page, the email app sends a second authorisation request.

Then after I authorise the app, I don't get the reposnse and the browser throws the following error which I cannot reproduce with master branch:

Uncaught Exception:
Error: EBADF: bad file descriptor, write
    at Object.fs.writeSync (fs.js:719:20)
    at SyncWriteStream._write (internal/fs.js:75:6)
    at doWrite (_stream_writable.js:332:12)
    at writeOrBuffer (_stream_writable.js:318:5)
    at SyncWriteStream.Writable.write (_stream_writable.js:245:11)
    at Console.log (console.js:43:16)
    at transport (/home/bochaco/work/bochaco-safe_examples/email_app/out/safe-mail-tutorial-linux-x64/resources/app.asar/node_modules/electron-log/lib/transports/console.js:14:31)
    at log (/home/bochaco/work/bochaco-safe_examples/email_app/out/safe-mail-tutorial-linux-x64/resources/app.asar/node_modules/electron-log/lib/log.js:31:15)
    at App.createWindow (/home/bochaco/work/bochaco-safe_examples/email_app/out/safe-mail-tutorial-linux-x64/resources/app.asar/app/index.js:28:21)
    at emitTwo (events.js:111:20)
hunterlester commented 6 years ago

The problem with placing the electron-log file in the same directory as the client libs log directory is that I cannot fetch the log path until at app is at least initialised. There are pieces of the client that need to be logged in between execution and app initialisation.

hunterlester commented 5 years ago

Closing, as email app has been archived.