where the logs in linux version?

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Post Reply
Message
Author
Postman
Archmage
Posts: 335
Joined: Fri Dec 03, 2010 5:34 pm

where the logs in linux version?

#1 Post by Postman »

Could never find stderr etc.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: where the logs in linux version?

#2 Post by darkgod »

In the terminal that runs it, if no terminal, no log
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: where the logs in linux version?

#3 Post by greycat »

Here's what I do, and what I suggest for other Linux users:
  • Edit src/main.c and make sure this line is NOT commented out:

    Code: Select all

            // Change to line buffering
            setvbuf(stdout, (char *) NULL, _IOLBF, 0);
    
    (In beta 19, that's line 700, near the top of main().)
  • premake4 gmake; make
  • mkdir logs
  • Whenever I start a game, I choose the name first, because then I do:

    Code: Select all

    ./t-engine >>logs/CHARNAME 2>&1
    
    to run the game. This puts your log information in a file named for that character, where you can read it at any time. Like, for example, during the game when 74 messages scroll past the window all at once, and you don't have a Z-Axis Scroll Wheel Mouse(tm), so you can't read them in-game. The line-buffering in src/main.c ensures that the log will always be up to date (so long as the game emits a newline after each message), rather than potentially having the critical combat messages you wanted to read held in a buffer.

    The line-buffering is also vitally important if the game crashes or hangs. You want to be able to see what the game was doing at that point, and if the last 3 kilobytes of logs are still held in a buffer, you wouldn't be able to see that.

Post Reply