It is currently 04 May 2024, 04:52
   
Text Size

Console output for debugging

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Console output for debugging

Postby slapshot5 » 21 Apr 2010, 17:18

Hi all,

Trying to use the console in Eclipse for debugging is almost useless right now due to the excessive writing of stuff like this:

Code: Select all
Currently 16 images in the cache
New Image for key: mana_pool
File not found, no image created: res\pics\mana_pool.jpg
It looks like this is all (at least most) coming from ImageCache.java. Probably from when the cache was first being implemented.

I'd like to comment this stuff out and check it in to make the console useful for debugging. (Or if someone wants to set up some kind of debug context around stuff like this to only display when running in that context.)

Objections?

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Console output for debugging

Postby slapshot5 » 21 Apr 2010, 18:05

On the same topic, what about all this stuff?

Code: Select all
java.lang.Exception: TreeProperties returns null for Display--properties
java.lang.Exception: TreeProperties returns null for Display/concede--properties
java.lang.Exception: TreeProperties returns null for Display/concede/button
java.lang.Exception: TreeProperties returns null for Display--properties
java.lang.Exception: TreeProperties returns null for en/Display--properties
java.lang.Exception: TreeProperties returns null for Display--properties
java.lang.Exception: TreeProperties returns null for en/Display--properties
I'm guessing this is something we need to fix?

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Console output for debugging

Postby DennisBergkamp » 21 Apr 2010, 18:33

Yeah, feel free to comment out the caching stuff.

The treeproperties exceptions are minor, Silly Freak is still working on finishing those I think, let's keep those warnings in for now.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Console output for debugging

Postby Chris H. » 21 Apr 2010, 19:34

slapshot5 wrote:I'd like to comment this stuff out and check it in to make the console useful for debugging. (Or if someone wants to set up some kind of debug context around stuff like this to only display when running in that context.)

Objections?
`
These debugging messages can sometimes stick around when then are no longer useful. Human tendency I guess. :)

We also tend to comment out code when we convert cards from code objects to keywords. The commented out code can also stick around for a longer period of time than is necessary.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Console output for debugging

Postby silly freak » 21 Apr 2010, 20:38

I haven't thought too much about those TreeProperties outputs lately, but after looking a the code again, I resolved it. My property lookup code works recursive, and if a recursive call returns null, this is also printed

generally for debugging output, I'm using log4j for my program, and it works perfect for me. log4j lets you configure for which classes to print debug output, without changing the source code.
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 28 guests

cron

Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 28 guests

Login Form