digitalmars.D.ldc - Unbuffered logging
- Johan Engelen (10/10) Apr 13 2015 Hi all,
- Kai Nacke (6/16) Apr 13 2015 Hi Johan!
- Johan Engelen (6/9) Apr 14 2015 Yeah I didn't mean anything big. pragma(LDC_verbose) is a big
Hi all, While debugging an ICE, it was helpful to look at the Logger output (obviously :), but, because it is buffered, the output log did not stop at the point where the crash happened. I added fflush(stdout) to Logger:printf/printfln to help with that. Is this something more people would like to have? Can we add an option somewhere to enable this? cheers, Johan
Apr 13 2015
On Monday, 13 April 2015 at 21:13:49 UTC, Johan Engelen wrote:Hi all, While debugging an ICE, it was helpful to look at the Logger output (obviously :), but, because it is buffered, the output log did not stop at the point where the crash happened. I added fflush(stdout) to Logger:printf/printfln to help with that. Is this something more people would like to have? Can we add an option somewhere to enable this? cheers, JohanHi Johan! IMHO the logger code needs to be redesigned and unified. But with the switch to DDMD I don't think that this has a high priority... Regards, Kai
Apr 13 2015
On Tuesday, 14 April 2015 at 05:15:51 UTC, Kai Nacke wrote:IMHO the logger code needs to be redesigned and unified. But with the switch to DDMD I don't think that this has a high priority...Yeah I didn't mean anything big. pragma(LDC_verbose) is a big help for me as an D/LDC newb. Is there a good argument against simply flushing Logger::printf ? Yes it will be slower, but I think very few people compile programs with pragma(LDC_verbose) without trying to find a bug? :)
Apr 14 2015