Page 1 of 1

instant infolog.txt writing [in new spring 83.0]

Posted: 09 Nov 2011, 16:35
by knorke
In Spring 83.0 messages are not instantly written to infolog.txt anymore but instead buffered until spring.exe is closed.
So while modding one can not read up on all the funny error messages, isn't that annoying.

This widget makes a file instantlog.txt in the same place where there is infolog.txt and instantly writes all console/chat text to it.
It only does that when /cheat is enabled because during modding I like to have that autoenabled (put Spring.SendCommands ("cheat") somewhere in mod) but during online games it is not.
To clear the logfile just disable&renable in F11 list.
(just noticed the "try to write even if logfile==nil" is a bit fail :roll: but oh well)

Re: instant infolog.txt writing

Posted: 09 Nov 2011, 20:10
by Jools
Thanks

Re: instant infolog.txt writing

Posted: 09 Nov 2011, 20:52
by hoijui
you could also just redirect stdout and stderr to files, or to one file. that should be more reliable, and works before Lua is initialized already.
stderr will get only warnings and errors. stdout the rest.

Re: instant infolog.txt writing

Posted: 10 Nov 2011, 11:38
by Jools
That works great on command line, but how do you do that in windows?

Re: instant infolog.txt writing

Posted: 10 Nov 2011, 11:41
by knorke
i think always running spring via a .bat file might work.
not sure if lobbies will work with that.

Re: instant infolog.txt writing

Posted: 10 Nov 2011, 12:36
by Jools
Yeah, but that's counterproductive to using a graphical UI in the first place. IIRC correctly people still did that with windows 95 or so.

Re: instant infolog.txt writing

Posted: 10 Nov 2011, 17:29
by CarRepairer
Get Komodo. Hit f6. Choose spring.exe and run it. Output appears at the bottom.

Also Komodo is the best editor I've ever come across.

Re: instant infolog.txt writing

Posted: 10 Nov 2011, 18:39
by FLOZi
Ever think to discuss this with your end users?

Even if you think it's trivial, it requires changes to peoples work flows. Which means it isn't.

Re: instant infolog.txt writing

Posted: 10 Nov 2011, 20:15
by knorke
in some meeting minutes it says the change was needed because some games spam so many errors that it becomes a problem for the computer.
kinda lol but maybe better for players it is better this way if it really was a problem. (which nubgame ruined it for everyone else?)

And with this thread modders now have various ways to get it "almost" like before.
I've made the thread sticky for 30 days because while it might be trivial for some, I feel like others might never have heard of stdout and such before.

Re: instant infolog.txt writing [in new spring 83.0]

Posted: 10 Nov 2011, 21:05
by yuritch
Spring is unlikely to cause a BSoD these days (which will surely result in no log except the startup stuff with the new logging btw), at least I haven't got a single Spring-related BSoD that year. I hope the log will get written after a 'normal' crash?

Re: instant infolog.txt writing [in new spring 83.0]

Posted: 10 Nov 2011, 22:00
by Licho
Dont be scared of threads it doe snot have to cause slowdowns or be buffered..

Re: instant infolog.txt writing

Posted: 11 Nov 2011, 00:44
by FLOZi
knorke wrote:in some meeting minutes it says the change was needed because some games spam so many errors that it becomes a problem for the computer.
kinda lol but maybe better for players it is better this way if it really was a problem. (which nubgame ruined it for everyone else?)

And with this thread modders now have various ways to get it "almost" like before.
I've made the thread sticky for 30 days because while it might be trivial for some, I feel like others might never have heard of stdout and such before.
If a game is spamming that many errors it needs fixing anyway, clearly. I've had epic lua spam in S44 many times and my computer soldiers onwards.

We shouldn't have to make do with 'almost' unless it is truly necessary - and in that case, we should be told what is being changed and why; beyond expecting us to read every detail of the minutes.

But as I said elsewhere; I am grouchy today.

Re: instant infolog.txt writing [in new spring 83.0]

Posted: 11 Nov 2011, 01:02
by smoth
I am not sure if I am pleased about this... I kinda like that spring freaks the fuck out when something is wrong. It means I am forced to fix it and players will notice it rather than tracking down mystery bugs.

Re: instant infolog.txt writing [in new spring 83.0]

Posted: 11 Nov 2011, 03:58
by Licho
Besides the error spam will still kill spring..i doubt lag was caused by writing to file,instead writing to ingame console slows things down :)

But it wont be slowed by slow disk blocking writes...

Re: instant infolog.txt writing [in new spring 83.0]

Posted: 11 Nov 2011, 10:13
by hoijui
i was told, that we could still have basically instant writing to file, if we would set the output-buffer size to a low value.
already forgot again, where/how to do that.

Re: instant infolog.txt writing

Posted: 11 Nov 2011, 12:05
by Jools
CarRepairer wrote:Get Komodo. Hit f6. Choose spring.exe and run it. Output appears at the bottom.

Also Komodo is the best editor I've ever come across.
Thanks, I got komodo and it works. I also like notepad++, too bad it doesn't have output like that.

Re: instant infolog.txt writing [in new spring 83.0]

Posted: 21 Jun 2012, 09:43
by abma
instant writing can be enabled in current development versions (and spring 89) by setting

Code: Select all

LogFlush = 1