System output and exceptions

AI discussion, ideas, and SDK help.
Post Reply
cha
Luxer
Posts: 15
Joined: Mon Feb 28, 2005 1:47 pm

System output and exceptions

Post by cha » Sat Mar 19, 2005 8:39 am

Hello,

Is it possible to catch System.outs and/or exceptions printed or thrown from a decendent of LuxAgent? :shock:

Best regards,
/Cha

cha
Luxer
Posts: 15
Joined: Mon Feb 28, 2005 1:47 pm

nm

Post by cha » Sat Mar 19, 2005 8:41 am

Nevermind , found the logfile in the installation folder :D

/Cha

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10927
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Post by dustin » Sat Mar 19, 2005 11:44 am

On MacOSX you can open the Console.app to get a live read-out of the output. On other systems if you start Lux from a command line then you will get a live read out. And the log file is always there (of the last run of Lux).

User avatar
guest
Luxer
Posts: 189
Joined: Fri Dec 17, 2004 9:17 pm
Location: Southern NH
Contact:

Post by guest » Sat Mar 19, 2005 4:26 pm

I just created a JFrame with a TextArea and printed all my debug messages to that

jaybird
Luxer
Posts: 29
Joined: Sun Apr 23, 2006 6:53 pm
Location: Pittsburgh

Post by jaybird » Sun Apr 23, 2006 8:57 pm

I would love some implementation guidance with the solution offered by 'guest'. I.e., creation of a Java scrolling text widget that I can write to for debug/analysis purposes.

User avatar
Bertrand
Reaper Creator
Posts: 568
Joined: Mon Nov 28, 2005 4:35 pm
Location: Montreal

Post by Bertrand » Sun Apr 23, 2006 9:19 pm

Here is what I do for debugging in Windows. Create an application icon that starts Lux with this command: "C:\WINDOWS\system32\java.exe -jar LuxCore.jar". Also set the start directory to "C:\Program Files\Lux".

When you start Lux this way, all stdout and stderr output will go to the text window in real time. I even use stdin input to pause the game at will.

User avatar
guest
Luxer
Posts: 189
Joined: Fri Dec 17, 2004 9:17 pm
Location: Southern NH
Contact:

Post by guest » Tue Apr 25, 2006 8:40 am

In the sprefs function were the agent is passed the board create a Frame add a TextArea to it. keep a reference to the text area somewere. call setText or append, etc. Take a look at the TextArea class in the Java API doc.

jaybird
Luxer
Posts: 29
Joined: Sun Apr 23, 2006 6:53 pm
Location: Pittsburgh

Post by jaybird » Tue Apr 25, 2006 12:15 pm

Thanks Bertrand and guest. I was able to see output from the console. I'll look into the use of a text box a little later.

fellowfreak
Lux Newbie
Posts: 4
Joined: Tue Oct 13, 2009 6:09 pm
Location: Austin
Contact:

Post by fellowfreak » Tue Oct 13, 2009 6:28 pm

dustin wrote:On MacOSX you can open the Console.app to get a live read-out of the output. On other systems if you start Lux from a command line then you will get a live read out. And the log file is always there (of the last run of Lux).
The log file is quite sparse in terms of reporting gameplay events. All it reports currently is "playerinfo.cardsWereCashed()" without indication of who cashed them, and it also reports when players are eliminated.

I've looked around to try to expand upon the log output, but I can't find out where it's getting created. Any help would be greatly appreciated.

User avatar
guest
Luxer
Posts: 189
Joined: Fri Dec 17, 2004 9:17 pm
Location: Southern NH
Contact:

Post by guest » Thu Oct 15, 2009 8:49 pm


Post Reply