dub build output redirect

seany seany at uni-bonn.de
Tue Jun 8 14:30:42 UTC 2021


On Tuesday, 8 June 2021 at 14:15:47 UTC, Steven Schveighoffer 
wrote:
> On 6/8/21 10:05 AM, seany wrote:
>> 
>> Hi
>> 
>> Thank you for pointing this out.
>> 
>> Indeed, much later in the code, there is a `readln()`.
>> But, the program needs to run 1-2 minutes, until it reaches 
>> that point - it is doing a complex AI calculation.
>> 
>> However, for these 1-2 minutes, there is no output. Not via 
>> `tee`command, also not when i do a `tail -f a` (`a` is the 
>> logfile as in my last mail). I expect  the output of these 1-2 
>> minutes, until the `readln` point to be visible via either of 
>> these to methods.
>> 
>> Is it still the same case as you describe?
>
> Yes, that is exactly the case. `tee` and `tail` commands are 
> not considered a console.
>
> Insert a `stdout.flush;` every time you want more output to 
> appear, and it should fix the issue.
>
> -Steve

Ok, thank you. it works.


More information about the Digitalmars-d-learn mailing list