Game Development Reference
In-Depth Information
LogCat and DDMS
The ADT Eclipse plug-in installs many new views and perspectives to be used in Eclipse. One of
the most useful views is the LogCat view, which we touched on briefly in the previous section.
LogCat is the Android event-logging system that allows system components and applications
to output logging information about various logging levels. Each log entry is composed of a
timestamp, a logging level, the process ID from which the log came, a tag defined by the logging
application itself, and the actual logging message.
The LogCat view gathers and displays this information from a connected emulator or device.
Figure 2-16 shows some sample output from the LogCat view.
Figure 2-16. The LogCat view
Notice that there are a number of buttons at the top left and top right of the LogCat view:
ï?®
The plus and minus buttons allow you to add and remove filters. There is
already one filter that will only show log messages from our application.
ï?®
The button to the right of the minus button allows you to edit an existing
filter.
ï?®
The drop-down list box allows you to select the log level that messages
must have to be displayed in the window below.
ï?®
The buttons to the right of the drop-down list box allow you to (in order from
left to right) save the current log output, clear the log console, toggle the
visibility of the left-side filter window, and halt updating the console window.
If several devices and emulators are currently connected, then the LogCat view will output the
logging data of only one. To get finer-grained control and even more inspection options, you can
switch to the DDMS perspective.
DDMS (Dalvik Debugging Monitor Server) provides a lot of in-depth information about the
processes and Dalvik VMs running on all connected devices. You can switch to the DDMS
perspective at any time via Window ➤ Open Perspective ➤ Other ➤ DDMS. Figure 2-17 shows
what the DDMS perspective usually looks like.
 
Search WWH ::




Custom Search