Hi, my application use writeln in docker don't display.
Python add -u disable it.
https://stackoverflow.com/questions/29663459/why-doesnt-python-app-print-anything-when-run-in-a-detached-docker-container
Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
March 12 Disable wrilten buf in docker | ||||
---|---|---|---|---|
| ||||
Hi, my application use writeln in docker don't display. Python add -u disable it. |
March 12 Re: Disable wrilten buf in docker | ||||
---|---|---|---|---|
| ||||
Posted in reply to zoujiaqing | On D's side you can use ``stdout.flush;`` to force it to flush. I don't think there is a way to force flushing via CLI. |
March 12 Re: Disable wrilten buf in docker | ||||
---|---|---|---|---|
| ||||
Posted in reply to Richard (Rikki) Andrew Cattermole | On Tuesday, 12 March 2024 at 06:39:40 UTC, Richard (Rikki) Andrew Cattermole wrote: >On D's side you can use I don't think there is a way to force flushing via CLI. OK, thank you! Problem solved! Use code:
|
March 12 Re: Disable wrilten buf in docker | ||||
---|---|---|---|---|
| ||||
Posted in reply to zoujiaqing | On Tuesday, 12 March 2024 at 06:36:09 UTC, zoujiaqing wrote: >Hi, my application use writeln in docker don't display. Python add -u disable it. Use setvbuf to switch to line buffering. Then you don’t have to manually flush everything https://en.cppreference.com/w/c/io/setvbuf -Steve |
March 14 Re: Disable wrilten buf in docker | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Tuesday, 12 March 2024 at 15:44:08 UTC, Steven Schveighoffer wrote: >On Tuesday, 12 March 2024 at 06:36:09 UTC, zoujiaqing wrote: >Hi, my application use writeln in docker don't display. Python add -u disable it. Use setvbuf to switch to line buffering. Then you don’t have to manually flush everything https://en.cppreference.com/w/c/io/setvbuf -Steve Thank you Steve! how to use it in global? |