Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

355
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda