No logs when using _fg=True
Exidex opened this issue · comments
Exidex commented
With this code:
import logging
import sh
logging.basicConfig(level=logging.INFO)
sh.ls(_fg=True)
there is no logs printed from library to show what command was actually executed
Andrew commented
Thanks for reporting.
Erik Cederstrand commented
I'm inclined to think that we shouldn't try to fix this. The docs for _fg already has a warning about sidestepping standard functionality. The reason that running in the foreground does not produce normal log output is that it completely bypasses the RunningCommand
class where this log output is created.
Andrew commented
Good call @ecederstrand, closing.