Open shouya opened 8 years ago
I think you would just need to change this line: https://github.com/yesodweb/Shelly.hs/blob/master/src/Shelly.hs#L1201
to use sPrintStdout state
.
In fact the command executed got print out to the console, except that this output can't be captured. So perhaps changing that line to sPrintStdout state
ain't very useful.
I guess perhaps I should change echo cmdString
to something else?
The following code demonstrates the problem:
ls
is printed but without[OUT]
prefix, this means myLogger is not handling command printing.Is it possible to capture all the commands like it for the outputs?
Why do I need this feature:
I'm writing a program that will run some shell commands and send all shell activities to a logger. Unfortunately at the time I can only capture stdout/stderr. The printed commands will be very helpful to locate errors and to trace what happened.