question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Share rolling file transport

See original GitHub issue

I would like to log just to one file in Electron, so I set in main.js:

const log = require("electron-log").create("main");
log.transports.file.fileName = "log.log";
log.transports.file.maxSize = 1024;

and preload.js

const log = require("electron-log").create("renderer");
log.transports.file.fileName = "log.log";
log.transports.file.maxSize = 1024;

The maxSize does not work, the file exceeds 1024 bytes if the logs are interleaved. And is it safe to share same file from main and renderer process? What if I have more windows - more renderer processes?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
xmedekocommented, Apr 15, 2021

And on the renderer side, ipcRenderer.send maybe used with window.requestIdleCallback() and a queue with a limit to keep renderer responsive even when under heavy log load.

2reactions
megahertzcommented, Apr 15, 2021

Thank you for the performance test. It seems that now IPC performed much more better compared to the previous electron version. I’m not going to change these things right now but I’ll think about it for the next major release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rolling-file-transport NPM | npm.io
A rolling file transport for the logging library winston for node.js. This transport has been modified from the original transport to create a...
Read more >
11 Best Ways to Transfer, Share or Send Large Files in 2022
Discover the 11 Best Ways to Transfer, Send or Share large files. Pros & Cons, Free & Paid tools. Services you can start...
Read more >
The 5 Best Mobile Apps for Sharing Large Files Instantly
With the best file transfer apps for Android and iOS, sharing large files with someone in a split second will be the easiest...
Read more >
File Transfer - Securely Share Files Of Any Size With Anyone
Use the Box Mobile App on any iOS or Android device for secure file transfer with your team, customers, external agencies or partners....
Read more >
10 top file-sharing services: Dropbox, Box, Google Drive ...
Back in the pre-cloud days, sharing files involved using file transfer protocol applications or else copying files to a disc and then ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found