megahertz / electron-log

Simple logging module Electron/Node.js/NW.js application. No dependencies. No complicated configuration.
MIT License
1.3k stars 127 forks source link

reverse the logs #332

Closed yishayhazan closed 1 year ago

yishayhazan commented 1 year ago

as someone who's trying to read the logs, it's kind of weird that they are sorted "down" by date, I would expect to see the newest log on the top,

maybe you could add this as optional?

thanks a lot.

megahertz commented 1 year ago

Do you mean log files? There's a reason why nobody doing that - in that case you should overwrite the whole file once new line is added. It's expensive, it may lead to data loss, impact on battery consumption and SSD health.

So it's much better to reverse lines using js code or tac command