Java MIDlet API Forums

« Back to Technical Discussion

RE: Handheld Phone debug output

Combination View Flat View Tree View
I'm looking for a way to store debug output to a file, along with a simple method to retrieve the file from the phone.  Is it possible for a midlet to write to the system messages file?

System.err.println prints to the messages file.

System.err.println prints to the messages file.

Currently, MIDlet can use System.out.println() and system.err.println() to write traces/logs. We do not provide separate API/location to store api. All the ourputs of System.out.println() and System.err.println() goes to device syslog messages Those syslog files can be extracted using device Web intetrface.

As of a couple hours ago, I'm no longer seeing my System.err.println messages in the system messages file, and for the life of me I can't figure out what I've done wrong.  Any ideas on how to get em back?
 

Although a midlet does have some access to storage space in the phone, I don't think that is accessible from the web page for down load. Normally if people want to keep the syslog fils on the phone, you enable the "Preserve logs" setting on the trace settings page, and then any log files would be written to nvram and can be downloaded later

By default the phone is configured to reset all tracing (i.e. back to 'error' level), is it possible you reset the phone between tracing sessions?  If you so you may need to re-configure tracing and/or make the settings persist.

 Go

By API/SDK: