Thanks Stefan. I'll see if I can get debugging to work for me in Eclipse.
SS On 5/22/07, Stefan Steiniger <[EMAIL PROTECTED]> wrote: > > > Sunburned Surveyor schrieb: > > Stefan, > > > > You wrote: "why dont you use the logging within jump that is already > > used, imstead > > of creatin a new file?" > > > the log file should be created if logs appear (but may be different on > linux? due to write permissions).. on my windows it does create a file. > > for its use see for instance in AbstractCursorTool.java. > > alternatively you also can use a println - but the debugging modus is best. > > > Which file are you referring to? I'd be happy to use it. (I'll delete > > my logging statements after I've identified my bugs, so this probably > > doesn't matter.) > > > > You wrote: "why don't u use in eclipse the debugging enovironment and > > simply add > > your variables you like to observe" > > > > I'm afraid I don't know how to use the debugger in Eclipse. I suppose > > it is time that I learned... > > just put on the left of the line with the mouse a break point - before > your critical line > > start OJ in debugging mode. > the programm stops if it reached your breakpoint and switches to > debugging view > > than you see on the left a toolbar for stepwise execution - on the right > window you see all variables and their values > > there should be also a tutorial by the eclipse guys. ;) > if i show debugging in eclipse to students they always wonder how easy > it is.. although some of them still use the command line to debug (why > ever?) > > > > > > SS > > > > On 5/22/07, Stefan Steiniger <[EMAIL PROTECTED]> wrote: > >> maybe not a direct help... > >> > >> but: > >> - why dont you use the logging within jump that is already used, imstead > >> pf creatin a new file? > >> - why don't u use in eclipse the debugging enovironment and simply add > >> your variables you like to observe > >> > >> stefan > >> > >> > >> Sunburned Surveyor schrieb: > >>> Nothing is ever easy. :] > >>> > >>> I'm trying to use log4j to identify the problems I'm having with > >>> OpenJUMP's rendering code. I've added a text file called debug_log.txt > >>> to the /lib directory of the OpenJUMP installation I'm testing. > >>> > >>> I've added the following code to the LayerViewPanel.repaint() method: > >>> > >>> /* > >>> * Set up logging code here. > >>> */ > >>> Logger myLogger = > >>> Logger.getLogger(com.vividsolutions.jump.workbench.ui.LayerViewPanel.class); > >>> SimpleLayout layout = new SimpleLayout(); > >>> > >>> FileAppender appender = null; > >>> > >>> try > >>> { > >>> appender = new FileAppender(layout, "debug_log.txt", true); > >>> } > >>> > >>> catch(Exception thisException) > >>> { > >>> System.err.println(thisException.getMessage()); > >>> } > >>> > >>> myLogger.addAppender(appender); > >>> > >>> Iterator loopThrough = contentIDs.iterator(); > >>> > >>> myLogger.info("This is a test."); > >>> > >>> while(loopThrough.hasNext()) > >>> { > >>> Object contentID = loopThrough.next(); > >>> Class contentIDClass = contentID.getClass(); > >>> String className = contentIDClass.getName(); > >>> myLogger.fatal("The class we couldn't find a renderer for was: " > >>> + className); > >>> } > >>> > >>> However, nothing is written to the log file when I execute OpenJUMP. I > >>> know the LayerViewPanel.repaint() method where I've placed the logging > >>> code is being exexcuted. > >>> > >>> Any ideas on what I am missing? > >>> > >>> Thanks, > >>> > >>> The Sunburned Surveyor > >>> > >>> ------------------------------------------------------------------------- > >>> This SF.net email is sponsored by DB2 Express > >>> Download DB2 Express C - the FREE version of DB2 express and take > >>> control of your XML. No limits. Just data. Click to get it now. > >>> http://sourceforge.net/powerbar/db2/ > >>> _______________________________________________ > >>> Jump-pilot-devel mailing list > >>> Jump-pilot-devel@lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>> > >>> > >> ------------------------------------------------------------------------- > >> This SF.net email is sponsored by DB2 Express > >> Download DB2 Express C - the FREE version of DB2 express and take > >> control of your XML. No limits. Just data. Click to get it now. > >> http://sourceforge.net/powerbar/db2/ > >> _______________________________________________ > >> Jump-pilot-devel mailing list > >> Jump-pilot-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >> > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel