| View previous topic :: View next topic |
| Author |
Message |
cha Luxer
Joined: 28 Feb 2005 Posts: 15
|
Posted: Sat Mar 19, 2005 8:39 am Post subject: System output and exceptions |
|
|
Hello,
Is it possible to catch System.outs and/or exceptions printed or thrown from a decendent of LuxAgent?
Best regards,
/Cha |
|
| Back to top |
|
 |
cha Luxer
Joined: 28 Feb 2005 Posts: 15
|
Posted: Sat Mar 19, 2005 8:41 am Post subject: nm |
|
|
Nevermind , found the logfile in the installation folder
/Cha |
|
| Back to top |
|
 |
dustin Lux Admin


Joined: 15 May 2003 Posts: 7502 Location: Vancouver
|
Posted: Sat Mar 19, 2005 11:44 am Post subject: |
|
|
| 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). |
|
| Back to top |
|
 |
guest Luxer

Joined: 17 Dec 2004 Posts: 188 Location: Southern NH
|
Posted: Sat Mar 19, 2005 4:26 pm Post subject: |
|
|
| I just created a JFrame with a TextArea and printed all my debug messages to that |
|
| Back to top |
|
 |
jaybird Luxer
Joined: 23 Apr 2006 Posts: 29 Location: Pittsburgh
|
Posted: Sun Apr 23, 2006 7:57 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Bertrand Reaper Creator

Joined: 28 Nov 2005 Posts: 583 Location: Montreal
|
Posted: Sun Apr 23, 2006 8:19 pm Post subject: |
|
|
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.
Last edited by Bertrand on Sun Apr 23, 2006 8:20 pm; edited 1 time in total |
|
| Back to top |
|
 |
guest Luxer

Joined: 17 Dec 2004 Posts: 188 Location: Southern NH
|
Posted: Tue Apr 25, 2006 7:40 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
jaybird Luxer
Joined: 23 Apr 2006 Posts: 29 Location: Pittsburgh
|
Posted: Tue Apr 25, 2006 11:15 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
fellowfreak Luxer
Joined: 13 Oct 2009 Posts: 4 Location: Austin
|
Posted: Tue Oct 13, 2009 5:28 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
guest Luxer

Joined: 17 Dec 2004 Posts: 188 Location: Southern NH
|
|
| Back to top |
|
 |
|