I’m running siril-cli.exe from a bat file, outside of the GUI program, as part of automated stacking operations, and whilst the process/script works the stdout is sent to a separate cmd console window, which then quickly disappears when the process finishes giving no chance of spotting /reading any final error messages. The contents of one of my typical BAT files looks like this.
cd “C:\Program Files\Siril\bin”
start siril-cli.exe -d “C:\Data\ZWO Imaging\SharpCap\M37” -s
“C:\Data\SiriL\scripts\OSC_stackframes.ssf”
I want to redirect stdout to an output log. I would normally do this by adding >output.log to the command line, viz
start siril-cli.exe -d “workfolder” -s “scriptfile.ssf” >output.log
An output.log is produced but it is empty - the stdout continues to go the separate cmd window and then disappear upon completion.
Separately I find that I couldn’t successfully run siril-cli.exe from outside its folder area
If I use
start “C:\Program Files\Siril\bin\siril-cli.exe” -d “workfolder” -s “scriptfile.ssf” >output.log
I get the error “Windows cannot find ‘-d’. Make sure you’ve typed the name correctly”
So I run this in the Siril/bin program folder
cd “C:\Program Files\Siril\bin”
start siril-cli.exe -d “workfolder” -s “scriptfile.ssf” >output.log
but this give a permissions error, unless I run the bat file as Administrator
when I use Administrator, the Output.log is generated but empty
So If I use
cd “C:\Program Files\Siril\bin”
start siril-cli.exe -d “workfolder” -s “scriptfile.ssf” > C:\userpath\output.log
the Output.log is generated but is again empty
Of course I can run the script in the GUI interface which shows & preserves the log messages in its own console window after the script finishes, and this is what I have to do to debug/problem solve any issues with the script.
But for live observatory operations where I submit the bat file via a Shell I need to capture the log messages for later diagnostics & problem solving if required. Any idea how I can successfully redirect Siril-cli’s stdout to a log file ?
BAT file
cd “C:\Program Files\Siril\bin”