Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
H3llGhost
Posts: 74
Registered: ‎02-19-2009
My Device: Not Specified

Realtime eventlog viewer

Hello,

 

I am searching for a realtime eventlog viewer to see what my application does on a real device.

Is there anything with that functionality?

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Realtime eventlog viewer

Not that I am aware off.  The only option I am aware of is to debug on device:

http://supportforums.blackberry.com/t5/Java-Development/How-Do-I-Debug-on-a-Live-Device/ta-p/446842

Please use plain text.
Developer
mayureshg
Posts: 31
Registered: ‎08-05-2011
My Device: 9550
My Carrier: Vodafone

Re: Realtime eventlog viewer

Or you can add a logger file on the device from your application. An try to logg whatever you feel is required. When needed you can pull the .log file to view all the events that you have logged.

 

import java.io.IOException;
import java.io.OutputStream;

import javax.microedition.io.Connector;
import javax.microedition.io.file.FileConnection;

public class Logger {

public static void d(Object msg) {
try {
FileConnection fc = (FileConnection) Connector
.open("file:///SDCard/MyApplog.txt");
OutputStream os = fc.openOutputStream(fc.fileSize());
os.write((msg == null ? "NULL" : (String) msg).getBytes());
os.write("\n".getBytes());
os.close();
fc.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

 

Only the events that you have logge that can be viewed in this file. Will help you in tracking realtime exception and app crashes for your application in the BB device.


/*********************************************************************/
Please press the like button on the right side to thank me if my reply helped you and please mark posts as solved if you found a solution.
Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Realtime eventlog viewer

[ Edited ]

This will, of course, only log your own events, rather than everything in the Event log, which is what I thought the OP wanted.. 

 

Edit: Opps, the previous post already saud this.  Sorry missed that. 

Please use plain text.
Developer
mayureshg
Posts: 31
Registered: ‎08-05-2011
My Device: 9550
My Carrier: Vodafone

Re: Realtime eventlog viewer

Yes.. As i have mentioned only those events will be logged that the developer had tried to logged. Any system event, etc, wont be logged.


/*********************************************************************/
Please press the like button on the right side to thank me if my reply helped you and please mark posts as solved if you found a solution.
Please use plain text.