Author Topic: Redirect console to text file  (Read 994 times)

johncprice

  • Member
  • *
  • Posts: 2
    • View Profile
Redirect console to text file
« on: July 10, 2016, 07:04:02 PM »
I am having difficulty getting Spinach to redirect console output to a text file.  I've tried things like this without success:

sys.output='file';
sys.logfile='C:\Users\Freddie Mercury\Google Drive\research';


kuprov

  • Administrator
  • Member
  • *****
  • Posts: 58
    • View Profile
Re: Redirect console to text file
« Reply #1 on: July 11, 2016, 12:00:07 PM »
Sorry, it's a bug, will fix in the forthcoming version. Comment out lines 583-585 in create.m, replace report.m with the attached and use the following in the input script:

sys.output='file_name_goes_here';

The bug touches upon the thorny issue of multiple parallel processes trying to write the same file. This workaround simply prevents the slave proceeeses from being able to write their messages to the log.