Forum: Pogamut Netbeans IDE Plugin

Logging and Map Viewer not working

I have started creating an agent, but I am running into 2 problems with netbeans.
- logs don't show any messages
- attempting to show the map crashes netbeans

I am using Netbeans 6.9.1, on Windows 7 64-bit.

When attempting to show the map, as indicated in the Navigation Bot tutorial, Netbeans locks up - a small icon indicates an error, and on mouseover I get this message:
"C:\Program Files\Netbeans 6.9.1\nb\modules\lib\jogl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform"
I have to close Netbeans and restart.

While not being able to visualise the map is an inconvenience, a more serious problem for me is the lack of log output. Is this also related to having a 64-bit OS?
Following the instructions in the Empty Bot tutorial about logging and introspection, introspection works as indicated. However, double clicking the 'user' node under logs only ever shows one message 'Log level set to ALL.' None of the info messages are displayed.

Everything else works fine, I'm able to run bots, connect as spectator or player to observe or trigger behaviours... I'm just not getting any the message logs that I need for my evaluation.

What am I doing wrong, and is there a workaround I could use?
Same here about the log issue.
Logs don´t show any messages using the Empty bot example,but I can see and use the map view.
In my case,double clicking the 'user' node under logs only shows one message 'Log level set to WARNING.'
Looking for info in the forum,I found this command:
//setting log level
getLog().setLevel(Level.OFF);

So I tried the code (I think it turns on all the logs)
//setting log level
getLog().setLevel(Level.ALL);

The result was that I still only get one message in the 'user' log :
'Log level set to ALL.'

I`m using Windows Home Premium 64 bits,Netbeans 6.9.1 basic (only java support),Java sdk 6u23 and Java se 6u23 (both 32 bits),pogamut 3.1

I remember I could see logs messages using an older pogamut version,maybe 3.0.8 or 3.0.11 and older netbeans,I think it was version 6.8,but I am not sure.
Hi!


This code in botInitialized method sets the log level to severe + it tells the logger to post the logs also to console (so you will see it in NetBeans/Eclipse output window - could be handy)
bot.getLogger().setLevel(Level.SEVERE);
        bot.getLogger().addDefaultConsoleHandler();


Considering the user logs. User log is for the users - for you - to log some debug information or etc. Type this code to logic() method.
user.severe("LOGIC!");


New message should appear in the user log each logic tick.

Considering the 3D map issue. Two things: 1) Check if you have installed 32Bit version of Java (with 64Bit there are issues). 2) Check that you have your Netbeans 6.9.1 updated to latest version (click Help -> Check for updates). Tell me if this helps.

Best,
Michal
Hi,
Thanks for your reply.

I tried using SEVERE instead of INFO, and that seems to work for logging - so that gives me a starting point. Is there a way to save the user log to file, to extract the data at a later time? I couldn't see any obvious way.

As for the map not displaying, as far as I know I have both 32-bit and 64-bit Java installed - I needed to run the 32-bit version to get the Pogamut 3 installer to run in the first place. Trying to find out which version is the active one being used I did a version test at the Java website, which gave me this result:

Your Java configuration is as follows:
Vendor: Sun Microsystems Inc.
Version: Java SE 6 Update 23
Operating System: Windows 7 6.1
Architecture: x86

Netbeans is updated to the latest version.
There are several log levels that create a hierarchy. For example, when you set log level to INFO then log levels FINE or FINER won't be displayed. The hierarchy is something like SEVERE, WARNING, INFO, FINE, FINER... Setting log level to SEVERE means that all "lower" log levels won't be displayed.

Considering the Java - do you need that 64Bit Java version for something? If not, I recommend to uninstall it - it could resolve the issue, if not then there is some other caveat. From the info you've posted I cannot tell whether you have 32 or 64 Bit java active.

Considering saving log to a file - that easy. Add something like this to botInitialized():

bot.getLogger().addDefaultFileHandler(new File("LOG_" + System.currentTimeMillis() + ".txt" ));


This will save your log to file named "LOG_CURRENT_TIME_IN_MS.txt"

Best,
Michal
Is there an equivalent way to save the user log to file? What I really need to be able to do is save the current state of several variables and associated messages to file for later evaluation. Unfortunately none of the methods available to 'user' have allowed me to get this output saved to file, and using the bot.getLogger() etc method doesn't write any of the user information to the text file.