MCPcopy Create free account
hub / github.com/LineageOS/android_frameworks_base / Log

Class Log

core/java/android/util/Log.java:54–358  ·  view source on GitHub ↗

API for sending log output. Generally, use the Log.v() Log.d() Log.i() Log.w() and Log.e() methods. The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. Verbose should never be compiled into an application except during development. Debug logs are compi

Source from the content-addressed store, hash-verified

52 * significant work and incurring significant overhead.
53 */
54public final class Log {
55
56 /**
57 * Priority constant for the println method; use Log.v.
58 */
59 public static final int VERBOSE = 2;
60
61 /**
62 * Priority constant for the println method; use Log.d.
63 */
64 public static final int DEBUG = 3;
65
66 /**
67 * Priority constant for the println method; use Log.i.
68 */
69 public static final int INFO = 4;
70
71 /**
72 * Priority constant for the println method; use Log.w.
73 */
74 public static final int WARN = 5;
75
76 /**
77 * Priority constant for the println method; use Log.e.
78 */
79 public static final int ERROR = 6;
80
81 /**
82 * Priority constant for the println method.
83 */
84 public static final int ASSERT = 7;
85
86 /**
87 * Exception class used to capture a stack trace in {@link #wtf}.
88 */
89 private static class TerribleFailure extends Exception {
90 TerribleFailure(String msg, Throwable cause) { super(msg, cause); }
91 }
92
93 /**
94 * Interface to handle terrible failures from {@link #wtf}.
95 *
96 * @hide
97 */
98 public interface TerribleFailureHandler {
99 void onTerribleFailure(String tag, TerribleFailure what);
100 }
101
102 private static TerribleFailureHandler sWtfHandler = new TerribleFailureHandler() {
103 public void onTerribleFailure(String tag, TerribleFailure what) {
104 RuntimeInit.wtf(tag, what);
105 }
106 };
107
108 private Log() {
109 }
110
111 /**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected