Skip to content

Commit

Permalink
Enable line-buffering for stdout
Browse files Browse the repository at this point in the history
This is useful in case when Odood is running in the CI
  • Loading branch information
katyukha committed Mar 30, 2023
1 parent 9c5422c commit 8a09b68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions subpackages/cli/source/odood/cli/app.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module odood.cli.app;

private import std.stdio;
private import std.logger;
private import std.format: format;

Expand Down Expand Up @@ -100,6 +101,10 @@ class App: OdoodProgram {
/** So setup actions before running any specific logic
**/
override void setup(scope ref ProgramArgs args) {
// Enable line buffering of stdout and stderr
stdout.setvbuf(1024*10, _IOLBF);
stderr.setvbuf(1024*10, _IOLBF);

int verbosity = args.occurencesOf("verbose");
int quietness = args.occurencesOf("quiet");

Expand Down

0 comments on commit 8a09b68

Please sign in to comment.