You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main = shelly $ log_stdout_with myLogger $ print_commands True$do
run "ls"[]
myLogger text =print$"[OUT] "<> text
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: