Closed GoogleCodeExporter closed 9 years ago
microlog (http://microlog.sourceforge.net/site/) looks promising, but currently
available version is not working. May need to find an older version or another
JAR?
Original comment by simt...@gmail.com
on 7 Mar 2009 at 7:09
The only reason it wasn't working was because I didn't export it... urgh.
Replaced all console logging with ApplicationMain.log.info - will need to clean
up
the abundant logging and perhaps add more, using different types of log.*.
Original comment by simt...@gmail.com
on 8 Mar 2009 at 12:58
Added FileAppender for logging to a file.
Log files are in the form "MILLEE.*.log" where * is the time in milliseconds
when
the app began and logging started.
The files should be stored in the default store on the phones. However, because
writing out to files is a security hazard, users may run into a ridiculous
amount of
security warnings now. Apparently, every time the app wants to write to a file,
it
has to prompt the user.
You can suppress the warnings on the emulator by changing the Wireless Tookit
settings (through its own bloaty UI). But that only works on the emulator - on
the
phone, we may have to play around with "signing".
See: http://developers.sun.com/mobility/midp/articles/permissions/
I included a keystore.key (self-signed) file in the latest commit - configure
EclipseME to use it when you generate your packages. Then try putting it on the
phones. Even then, it may not work because it's self-signed - we don't have the
authority of Verisign or any other root authority.
You can always just comment out the line that brings in the FileAppender in
ApplicationMain if it doesn't work. Just don't comment out ConsoleAppender or
you
won't see anything on your console.
Configuring EclipseME to perform signing:
Right-click project > Properties > J2ME > Midlet Suite Signing > check "Sign
project" > point to keystore.key file in the Project > Key Alias = "mykey" >
Click
Verify Settings > Enter password [Matt's favorite research group in lower case]
> OK
Now whenever you generate the .JAD packages, they should be signed with the
keystore.
Original comment by simt...@gmail.com
on 11 Mar 2009 at 3:26
File output is turning out to not be possible without a signed certificate from
a
trusted CA. Since we are not willing to pay for that, we will have to find some
other
way to output log files. We have decided to record to RecordStores during the
game,
and are building another MIDlet to dump these RecordStores when asked.
Original comment by simt...@gmail.com
on 12 Mar 2009 at 5:40
Logging is accomplished by starting a bluetooth serial server on an external
machine,
then starting LogDumper on the MIDlet.
java -cp microlog-servers.jar net.sf.microlog.server.btspp.MicrologBtsppServer
Original comment by simt...@gmail.com
on 13 Mar 2009 at 6:11
Original issue reported on code.google.com by
simt...@gmail.com
on 7 Mar 2009 at 2:04