Logging to a file in Windows

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Logging to a file in Windows

Post by Zutty »

Hi all,

Is it possible to send all the NoAI logging output to a file in Windows. I have tried "> log.txt", "2>> log.txt", and "> log.txt 2>&1" and nothing seems to work.

I'm using Vista Home Premium x64.

I ask because I never seem to have enough space to scroll-back in any of the logging windows, and it would be nice to be able to debug easily without having to spend ages trying to recreate bugs just to see the output.

Thanks very much,
George
PathZilla - A networking AI - Now with tram support.
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: Logging to a file in Windows

Post by glx »

You need to convert OpenTTD to a console app first.
You can do this using http://devs.openttd.org/~glx/convert.zip.
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: Logging to a file in Windows

Post by Zutty »

Oh fantastic! That worked perfectly. For reference, after converting the EXE I used the following...

Code: Select all

openttd.exe -g -d ai=5 2>> ai_log.txt
Thanks very much glx. :bow:
PathZilla - A networking AI - Now with tram support.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests