Skip to content

Commit

Permalink
Set 0 buffer for stdout
Browse files Browse the repository at this point in the history
So that journald can follow its logs
  • Loading branch information
wooparadog authored and PixlOne committed May 8, 2023
1 parent 3fb18a7 commit 99716cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/logid/logid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ int main(int argc, char** argv) {
std::shared_ptr<Configuration> config;
std::shared_ptr<InputDevice> virtual_input;


/* Set stdout buff to Null so that loging system like journal
* can actually read it.
*/
setbuf(stdout, NULL);

// Read config
try {
config = std::make_shared<Configuration>(options.config_file);
Expand Down

0 comments on commit 99716cb

Please sign in to comment.