Page 1 of 1

[0.12.2 Windows] Lua output is lost.

Posted: Thu Aug 06, 2015 6:11 pm
by Flux Faraday
1) Output from the "print" statement in Lua is not logged to "factorio-current.log" in Windows. I'm told that it is saved there in the Linux build. This is very useful for debugging mods at setup time. (see here for a little more background https://forums.factorio.com/forum/vie ... 25&t=14522 )

2) Lua output *does* appear in the executable's output stream, but Factorio.exe appears to ignore all file redirection in Windows. The 0.11.* series didn't do this, Factorio stayed in foreground and obeyed redirection.

Either or both of these might be intended behavior, what would be helpful is some way to get Lua output into a file.

To duplicate, add "print ("hello")" to any of Factorio's data.lua file, start cmd or powershell in windows, navigate to Factorio's x64 directory, run ".\Factorio.exe > log.temp 2> log2.temp", notice that the output ignores this redirection, quit factorio and also notice that "hello" doesn't appear in "factorio-current.log".

Since the output does appear on the terminal that you run Factorio from, a workaround is to simply not print very much from Lua, then the output doesn't scroll off the top of whatever shell/window you're using.

Thanks for reading.

Re: [0.12.2 Windows] Lua output is lost.

Posted: Thu Aug 06, 2015 6:22 pm
by kovarex
Output from lua isn't printed to output or log.