[req]Spring parameter to specify infolog.txt location

[req]Spring parameter to specify infolog.txt location

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

[req]Spring parameter to specify infolog.txt location

Post by Licho »

It would be great if there was such parameter. That way I could run multiple autohosts or autohost and client from save location AND read infolog.txt to parse chat messages from players and other info for stats.

Also something like /hidden parameter would be great (to hide minimized spring window completely).
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

You could set StdoutDebug to 1 in the registry and redirect stdout to your program.

It causes the logoutput, which normally goes just to infolog.txt (and GUI) to stdout (console) too, so starting spring with stdout redirected to your program should work (through a pipe... in POSIX/C or python you'd use e.g. popen() for it).
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Hmm interesting.. does it slow down the server the StdoutDebug?
Is it same log like infolog?

(Pipe is much better than current method of using OS to monitor file for changes and then reading end of that file for new data)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

No, if any slowdown it is negligible. Yes, it is (should be) identical to the infolog (both the stdout output and the infolog output are backends of the same logging functionality).
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Excellent, it works, thx :)
Post Reply

Return to “Engine”