Don't ever print to stdout like this. logger usage is more than enough. You can then configure loggers to print to stdout when necessary. Now, if I don't want anything to be printed to stdout I need to remove all "prints" manually.