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

Post all other topics which do not belong to any other category.
Post Reply
Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

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

Post 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.
I have mods! I guess!
Link

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

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

Post 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.

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

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

Post 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.
I have mods! I guess!
Link

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

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

Post 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.

Post Reply

Return to “General discussion”