BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 01-29-2010, 07:30 AM   #1 (permalink)
New Member
 
Join Date: Apr 2009
Model: 8800
PIN: N/A
Carrier: abc
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question How to add logging in BB application using JDE.

Please Login to Remove!

Hi,

I am in need of some info regarding logging in BB application.

I am using BB JDE to develop the apps.
Can anyone pls. let me know how to add logging in a BB application?
If possible pls provide a sample application.

Thanks in advance,
Sreelatha.
Offline  
Old 01-29-2010, 09:39 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Use net.rim.device.api.system.EventLogger, sample code is included in the API documentation.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 02-03-2010, 02:18 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2009
Model: 8800
PIN: N/A
Carrier: Airtel
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sample code:

class Log
{
private static final String APP_Name = "myApp";
private static final long GUID = 0x5ddd3452d88822e2L;


static
{
init();
}

public static void init()
{
EventLogger.register(GUID, APP_Name, EventLogger.VIEWER_STRING);
}

public static void debug(String value)
{
// add check for EventLogger.getMinimumLevel() >= debug level
EventLogger.logEvent(GUID, value.getBytes(), EventLogger.DEBUG_INFO);
}

}

You may now use Log.debug in your application whereever required.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

TalkSwitch 4.5 Hour Memory Card + 30 Days WARRANTY LQQK
$119.0
TalkSwitch  4.5 Hour Memory Card    +    30 Days WARRANTY   LQQK  pictureUsed Fujisoku bs128f1-c memory card GP510-BS128
$306.84
Used Fujisoku bs128f1-c memory card GP510-BS128 pictureRFM Best ergonomic office chair Executive High Back w/memory foam seat
$999.99
RFM Best ergonomic office chair Executive High Back w/memory foam seat pictureKINGSTON KVR100X64C3/256 MEMORY RAM * NEW NO BOX *
$9.0
KINGSTON KVR100X64C3/256 MEMORY RAM * NEW NO BOX * picturePI 8 Hours Memory Storage Blood Oxygen Meter Finger Tip Pulse SpO2 Oximeter
$15.75
PI 8 Hours Memory Storage Blood Oxygen Meter Finger Tip Pulse SpO2 Oximeter picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.