is myscript.sh a script you've written or have the ability to modify?
If you have to redirect output to get it to a file (from the command line), then the default output is stdout - which usually comes from something like echo.
So simply do 2 echos, i.e.
echo $foo >> constant_log_file
This way the user can do what they want with stdout & it will not have an effect on what goes to constant_log_file.
Otherwise, I don't believe it's possible for the script to know how the user has manipulated stdout other than to look for itself in the process tree to see how it was executed.