View topic - instant infolog.txt writing [in new spring 83.0]



All times are UTC + 1 hour


Post new topic Reply to topic  [ 17 posts ] 
Author Message
PostPosted: 09 Nov 2011, 16:35 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
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)


Attachments:
tp_instantlog.lua [735 Bytes]
Downloaded 82 times
Top
 Offline Profile  
 
PostPosted: 09 Nov 2011, 20:10 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Thanks


Top
 Offline Profile  
 
PostPosted: 09 Nov 2011, 20:52 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 11:38 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
That works great on command line, but how do you do that in windows?


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 11:41 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
i think always running spring via a .bat file might work.
not sure if lobbies will work with that.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 12:36 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
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.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 17:29 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
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.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 18:39 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 20:15 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
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.


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 21:05 
Spring 1944 Developer
User avatar

Joined: 11 Oct 2005, 06:18
Location: Ukraine
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?


Top
 Offline Profile  
 
PostPosted: 10 Nov 2011, 22:00 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Dont be scared of threads it doe snot have to cause slowdowns or be buffered..


Top
 Offline Profile  
 
PostPosted: 11 Nov 2011, 00:44 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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.


Top
 Offline Profile  
 
PostPosted: 11 Nov 2011, 01:02 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
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.


Top
 Offline Profile  
 
PostPosted: 11 Nov 2011, 03:58 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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...


Top
 Offline Profile  
 
PostPosted: 11 Nov 2011, 10:13 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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.


Top
 Offline Profile  
 
PostPosted: 11 Nov 2011, 12:05 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
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.


Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 08:43 
Spring Developer

Joined: 31 May 2009, 23:08
instant writing can be enabled in current development versions (and spring 89) by setting

Code:
LogFlush = 1


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.