Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

352
Views
Electron-log with file transport is forcing app reload

I am using the electron-todo template and trying to create a log file that recovers the data in the event of a crash. The app reloads every time the log file is updated. How would I prevent the app from reloading every time? I intended the logging to occur in the background while the app keeps running. In the renderer I have the following:

const path = require("path");
const log = require("electron-log");
log.transports.file.resolvePath = () => path.join("renderer", 'main.log');

document.getElementById('todoForm').addEventListener('submit', (evt) => {
  evt.preventDefault()
  const input = evt.target[0]
  ipcRenderer.send('add-todo', input.value)
  .then(()=>{
    log.info('Log todo:', input.value) //this is causing app to reload
  })
  .catch((err)=>{
    alert('Cannot log todo')
  })
})

I cannot see any console error output upon app reload, but the log file does record as it should.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!