Page 1 of 1

[17->18]when did the output of /c + log change?

Posted: Mon Feb 10, 2020 3:11 am
by Honktown
Running some /c commands and logging. Noticed in 18 it prints:

Code: Select all

24536.709 Script =(command):1: nil
Instead of 17:

Code: Select all

  67.421 Script log(game.item_prototypes["crude-oil"]):1: nil
Looked in 18 version history on wiki but there's nothing on "console" or "command".

I didn't know where else to put this. It's not a problem, but it's not off-topic either. No help needed, just something I noticed.

Re: [17->18]when did the output of /c + log change?

Posted: Wed Feb 12, 2020 7:23 am
by justarandomgeek
I changed this in a PR because it makes for nicer appearance of console defined (and serpent defined) functions in debugging tools with named chunks rather than the full source text. It was in 0.18.0.

Re: [17->18]when did the output of /c + log change?

Posted: Wed Feb 12, 2020 4:05 pm
by Honktown
justarandomgeek wrote:
Wed Feb 12, 2020 7:23 am
I changed this in a PR because it makes for nicer appearance of console defined (and serpent defined) functions in debugging tools with named chunks rather than the full source text. It was in 0.18.0.
Thanks. I thought it was more for the single long line of /c command one would get, since every log print was prefixed with it.

Re: [17->18]when did the output of /c + log change?

Posted: Wed Feb 12, 2020 4:27 pm
by justarandomgeek
That it also cleaned up console errors was a convenient side effect - I actually wanted it because I display functions as <chunkname:linedefined> in debug views and in call stacks (in my vscode debugger) if they don't have a better name. There's a couple other small tweaks for debugging, like a bigger buffer on debug.debug() and keeping log output on stdout on Windows if somebody's actually reading it.