• Home
  • Raw
  • Download

Lines Matching refs:code

34   <h2 id="logClass">The <code>Log</code> class</h2>
36 <p>{@link android.util.Log} is a logging class that you can utilize in your code to print out
68 <p>You can use the <code>logcat</code> command from your development computer or from a remote
80 <p>The following table describes the <code>logcat</code> command line options:</p>
84 <td><code>-c</code></td>
90 <td><code>-d</code></td>
96 <td><code>-f&nbsp;&lt;filename&gt;</code></td>
98 <td>Writes log message output to <code>&lt;filename&gt;</code>. The default is
99 <code>stdout</code>.</td>
103 <td><code>-g</code></td>
108 <td><code>-n&nbsp;&lt;count&gt;</code></td>
110 <td>Sets the maximum number of rotated logs to <code>&lt;count&gt;</code>. The default value
111 is 4. Requires the <code>-r</code> option.</td>
115 <td><code>-r&nbsp;&lt;kbytes&gt;</code></td>
117 <td>Rotates the log file every <code>&lt;kbytes&gt;</code> of output. The default value is
118 16. Requires the <code>-f</code> option.</td>
122 <td><code>-s</code></td>
128 <td><code>-v&nbsp;&lt;format&gt;</code></td>
130 <td>Sets the output format for log messages. The default is <code>brief</code> format. For a
149 <li><code>V</code> &mdash; Verbose (lowest priority)</li>
151 <li><code>D</code> &mdash; Debug</li>
153 <li><code>I</code> &mdash; Info</li>
155 <li><code>W</code> &mdash; Warning</li>
157 <li><code>E</code> &mdash; Error</li>
159 <li><code>F</code> &mdash; Fatal</li>
161 <li><code>S</code> &mdash; Silent (highest priority, on which nothing is ever printed)</li>
168 <code>&lt;priority&gt;/&lt;tag&gt;</code>.</p>
181 <p>A filter expression follows this format <code>tag:priority ...</code>, where <code>tag</code>
182 indicates the tag of interest and <code>priority</code> indicates the <em>minimum</em> level of
184 written to the log. You can supply any number of <code>tag:priority</code> specifications in a
194 <p>The final element in the above expression, <code>*:S</code>, sets the priority level for all
196 <code>*:S</code> is an excellent way to ensure that log output is restricted to the filters that
207 environment variable <code>ANDROID_LOG_TAGS</code>:</p>
212 <p>Note that <code>ANDROID_LOG_TAGS</code> filter is not exported to the emulator/device
213 instance, if you are running LogCat from a remote shell or using <code>adb shell
214 logcat</code>.</p>
220 you use the <code>-v</code> option and specify one of the supported output formats listed
224 <li><code>brief</code> &mdash; Display priority/tag and PID of the process issuing the
227 <li><code>process</code> &mdash; Display PID only.</li>
229 <li><code>tag</code> &mdash; Display the priority/tag only.</li>
231 <li><code>raw</code> &mdash; Display the raw log message, with no other metadata fields.</li>
233 <li><code>time</code> &mdash; Display the date, invocation time, priority/tag, and PID of the
236 <li><code>threadtime</code> &mdash; Display the date, invocation time, priority, tag, and
239 <li><code>long</code> &mdash; Display all metadata fields and separate messages with blank
244 <code>-v</code> option:</p>
249 <p>Here's an example that shows how to generate messages in <code>thread</code> output
255 <p>Note that you can only specify one output format with the <code>-v</code> option.</p>
261 …run the <code>logcat</code> command with the <code>-b</code> option, to request viewing of an alte…
265 <li><code>radio</code> &mdash; View the buffer that contains radio/telephony related
268 <li><code>events</code> &mdash; View the buffer containing events-related messages.</li>
270 <li><code>main</code> &mdash; View the main log buffer (default)</li>
273 <p>The usage of the <code>-b</code> option is:</p>
286 <p>By default, the Android system sends <code>stdout</code> and <code>stderr</code>
287 (<code>System.out</code> and <code>System.err</code>) output to <code>/dev/null</code>. In
290 <code>stdout</code> and <code>stderr</code>, both with priority <code>I</code>.</p>
293 shell command <code>setprop</code> to enable the redirection of output. Here's how you do it:</p>
302 <code>/data/local.prop</code> on the device.</p>