简体   繁体   中英

Debugging issue with BlackBerry

I want to print customer Log messages to log file. I have used following code snippet in my BlackBerry application main method.

EventLogger.register(0xaa21388c0c6ee7a7L, TAG, EventLogger.VIEWER_STRING);

String myName = "AnujaAroshA";

if (EventLogger.logEvent(0xaa21388c0c6ee7a7L, myName.getBytes())) {
    System.out.println(" #### Log Successful!");
}

It prints " Log Successful " message on the console when my App is running on the real device. Real device is connected to my PC using a USB cable.

Then I tried to copy the log messages in to a text file using command line like follow.

javaloader eventlog > log.txt

After running this the device get freeze as well as the command line. I am developping using Eclipse and in Windows 7 OS.

When I unplug the device and reconnect it and run the same command, it will generate the file with some logs. But in that log file I cannot find 0xaa21388c0c6ee7a7L which is my application GUID.

Where I have made mistakes?

The GUID is used to efficiently represent the tag you want to use with the event logger. When using javaloader, it will format the log entries with the tag you set when registering the GUID with the event logger. So you won't see the GUID value, you will just see the TAG. Make sure your TAG is unique.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM