Closed extincted closed 8 years ago
Log rotation of this nature would better be handled by truncating the log file than deleting it, e.g. echo > debug.log
I just checked and @deusstultus solution is probably the most practical one. Several threads write into debug.log, so implementing thread-safe log-rotation from within dashd itself would be quite some work.
Agree with @crowning-, @deusstultus 's solution seems to be the best way to deal with the issue - in general, it's always better to use simple tools that already do the work you need to be done rather than trying to implement everything in your own code imo.
Closing this.
Hi, I have the -debug=net enabled (which I need to retrieve information about a little project of mine). Problem is that the file get big very fast (of course). My problem was when i tried to rotate the file (manual cronjob just gziping the file), there's no new debug.log.
It's not a critical bug but it would be nice to be able to rotate the files (or maybe via the daemon?).
So how to recreate: Enable debuging (-debug will do). Remove .dash/debug.log
No new file is created.