Attached is an example file that shows how to redirect the Ruby console to file(s). At present, the path is set to
ENV['TMPDIR'] || ENV['TEMPDIR']. Usage after load:
SU_IO.file stderr & stdout to ruby_all.log SU_IO.file :both stderr to ruby_err.log, stdout to ruby_out.log SU_IO.file :err stderr to ruby_err.log SU_IO.file :out stdout to ruby_out.log SU_IO.rc reconnect Ruby console
Tested on Windows, there may be buffering issues. Also, I set it to work with a UDP socket, and everything worked fine.
console_redirect.rb (2.2 KB)