# Log

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/util/Log#constants)\|[Methods](https://developer.android.com/reference/android/util/Log#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/util/Log#inhmethods)  

# Log

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/util/Log "View this page in Kotlin")\|Java

`
public

final

class
Log
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.util.Log |

<br />

*** ** * ** ***

API for sending log output.

Generally, you should use the[Log.v()](https://developer.android.com/reference/android/util/Log#v(java.lang.String,%20java.lang.String)),[Log.d()](https://developer.android.com/reference/android/util/Log#d(java.lang.String,%20java.lang.String)),[Log.i()](https://developer.android.com/reference/android/util/Log#i(java.lang.String,%20java.lang.String)),[Log.w()](https://developer.android.com/reference/android/util/Log#w(java.lang.String,%20java.lang.String)), and[Log.e()](https://developer.android.com/reference/android/util/Log#e(java.lang.String,%20java.lang.String))methods to write logs. You can then[view the logs in logcat](https://developer.android.com/studio/debug/am-logcat).

The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE.

**Tip:** A good convention is to declare a`TAG`constant in your class:  

```
private static final String TAG = "MyActivity";
```
and use that in subsequent calls to the log methods.

<br />

**Tip:**Don't forget that when you make a call like  

```
Log.v(TAG, "index=" + i);
```
that when you're building the string to pass into Log.d, the compiler uses a StringBuilder and at least three allocations occur: the StringBuilder itself, the buffer, and the String object. Realistically, there is also another buffer allocation and copy, and even more pressure on the gc. That means that if your log message is filtered out, you might be doing significant work and incurring significant overhead.

When calling the log methods that take a Throwable parameter, if any of the throwables in the cause chain is an`UnknownHostException`, then the stack trace is not logged.

Note: The return value from the logging functions in this class may vary between Android releases due to changes in the logging implementation. For the methods that return an integer, a positive value may be considered as a successful invocation.

## Summary

|                                                              ### Constants                                                              ||
|-------|----------------------------------------------------------------------------------------------------------------------------------|
| `int` | [ASSERT](https://developer.android.com/reference/android/util/Log#ASSERT) Priority constant for the println method.              |
| `int` | [DEBUG](https://developer.android.com/reference/android/util/Log#DEBUG) Priority constant for the println method; use Log.d.     |
| `int` | [ERROR](https://developer.android.com/reference/android/util/Log#ERROR) Priority constant for the println method; use Log.e.     |
| `int` | [INFO](https://developer.android.com/reference/android/util/Log#INFO) Priority constant for the println method; use Log.i.       |
| `int` | [VERBOSE](https://developer.android.com/reference/android/util/Log#VERBOSE) Priority constant for the println method; use Log.v. |
| `int` | [WARN](https://developer.android.com/reference/android/util/Log#WARN) Priority constant for the println method; use Log.w.       |

|                                                                                                                                                                                                                                                                           ### Public methods                                                                                                                                                                                                                                                                            ||
|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static int`                                                                | ` `[d](https://developer.android.com/reference/android/util/Log#d(java.lang.String,%20java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` Send a[DEBUG](https://developer.android.com/reference/android/util/Log#DEBUG)log message and log the exception.     |
| ` static int`                                                                | ` `[d](https://developer.android.com/reference/android/util/Log#d(java.lang.String,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg) ` Send a[DEBUG](https://developer.android.com/reference/android/util/Log#DEBUG)log message.                                                                                                                                 |
| ` static int`                                                                | ` `[e](https://developer.android.com/reference/android/util/Log#e(java.lang.String,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg) ` Send an[ERROR](https://developer.android.com/reference/android/util/Log#ERROR)log message.                                                                                                                                |
| ` static int`                                                                | ` `[e](https://developer.android.com/reference/android/util/Log#e(java.lang.String,%20java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` Send a[ERROR](https://developer.android.com/reference/android/util/Log#ERROR)log message and log the exception.     |
| ` static `[String](https://developer.android.com/reference/java/lang/String) | ` `[getStackTraceString](https://developer.android.com/reference/android/util/Log#getStackTraceString(java.lang.Throwable))`(`[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` Handy function to get a loggable stack trace from a Throwable If any of the throwables in the cause chain is an`UnknownHostException`, this returns an empty string.                                                                                                        |
| ` static int`                                                                | ` `[i](https://developer.android.com/reference/android/util/Log#i(java.lang.String,%20java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` Send a[INFO](https://developer.android.com/reference/android/util/Log#INFO)log message and log the exception.       |
| ` static int`                                                                | ` `[i](https://developer.android.com/reference/android/util/Log#i(java.lang.String,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg) ` Send an[INFO](https://developer.android.com/reference/android/util/Log#INFO)log message.                                                                                                                                  |
| ` static boolean`                                                            | ` `[isLoggable](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, int level) ` Checks to see whether or not a log for the specified tag is loggable at the specified level.                                                                                                                                                                                        |
| ` static int`                                                                | ` `[println](https://developer.android.com/reference/android/util/Log#println(int,%20java.lang.String,%20java.lang.String))`(int priority, `[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg) ` Low-level logging call.                                                                                                                                                                  |
| ` static int`                                                                | ` `[v](https://developer.android.com/reference/android/util/Log#v(java.lang.String,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg) ` Send a[VERBOSE](https://developer.android.com/reference/android/util/Log#VERBOSE)log message.                                                                                                                             |
| ` static int`                                                                | ` `[v](https://developer.android.com/reference/android/util/Log#v(java.lang.String,%20java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` Send a[VERBOSE](https://developer.android.com/reference/android/util/Log#VERBOSE)log message and log the exception. |
| ` static int`                                                                | ` `[w](https://developer.android.com/reference/android/util/Log#w(java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` Send a[WARN](https://developer.android.com/reference/android/util/Log#WARN)log message and log the exception.                                                                                                     |
| ` static int`                                                                | ` `[w](https://developer.android.com/reference/android/util/Log#w(java.lang.String,%20java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` Send a[WARN](https://developer.android.com/reference/android/util/Log#WARN)log message and log the exception.       |
| ` static int`                                                                | ` `[w](https://developer.android.com/reference/android/util/Log#w(java.lang.String,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg) ` Send a[WARN](https://developer.android.com/reference/android/util/Log#WARN)log message.                                                                                                                                   |
| ` static int`                                                                | ` `[wtf](https://developer.android.com/reference/android/util/Log#wtf(java.lang.String,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg) ` What a Terrible Failure: Report a condition that should never happen.                                                                                                                                                 |
| ` static int`                                                                | ` `[wtf](https://developer.android.com/reference/android/util/Log#wtf(java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` What a Terrible Failure: Report an exception that should never happen.                                                                                                                                        |
| ` static int`                                                                | ` `[wtf](https://developer.android.com/reference/android/util/Log#wtf(java.lang.String,%20java.lang.String,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` tag, `[String](https://developer.android.com/reference/java/lang/String)` msg, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` tr) ` What a Terrible Failure: Report an exception that should never happen.                                          |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### ASSERT

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ASSERT
```

Priority constant for the println method.

<br />

Constant Value: 7 (0x00000007)  

### DEBUG

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int DEBUG
```

Priority constant for the println method; use Log.d.

<br />

Constant Value: 3 (0x00000003)  

### ERROR

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR
```

Priority constant for the println method; use Log.e.

<br />

Constant Value: 6 (0x00000006)  

### INFO

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int INFO
```

Priority constant for the println method; use Log.i.

<br />

Constant Value: 4 (0x00000004)  

### VERBOSE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int VERBOSE
```

Priority constant for the println method; use Log.v.

<br />

Constant Value: 2 (0x00000002)  

### WARN

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int WARN
```

Priority constant for the println method; use Log.w.

<br />

Constant Value: 5 (0x00000005)

## Public methods

### d

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int d (String tag, 
                String msg, 
                Throwable tr)
```

Send a[DEBUG](https://developer.android.com/reference/android/util/Log#DEBUG)log message and log the exception.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value may be`null`. <br />                                                                                   |
| `tr`  | `Throwable`: An exception to log. This value may be`null`. <br />                                                                                              |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### d

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int d (String tag, 
                String msg)
```

Send a[DEBUG](https://developer.android.com/reference/android/util/Log#DEBUG)log message.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value cannot be`null`. <br />                                                                                |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### e

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int e (String tag, 
                String msg)
```

Send an[ERROR](https://developer.android.com/reference/android/util/Log#ERROR)log message.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value cannot be`null`. <br />                                                                                |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### e

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int e (String tag, 
                String msg, 
                Throwable tr)
```

Send a[ERROR](https://developer.android.com/reference/android/util/Log#ERROR)log message and log the exception.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value may be`null`. <br />                                                                                   |
| `tr`  | `Throwable`: An exception to log. This value may be`null`. <br />                                                                                              |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### getStackTraceString

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static String getStackTraceString (Throwable tr)
```

Handy function to get a loggable stack trace from a Throwable

If any of the throwables in the cause chain is an`UnknownHostException`, this returns an empty string.

<br />

|                               Parameters                                ||
|------|-------------------------------------------------------------------|
| `tr` | `Throwable`: An exception to log. This value may be`null`. <br /> |

|                                                Returns                                                 ||
|--------------------------------------------------------------------|------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | This value cannot be`null`. <br /> |

### i

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int i (String tag, 
                String msg, 
                Throwable tr)
```

Send a[INFO](https://developer.android.com/reference/android/util/Log#INFO)log message and log the exception.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value may be`null`. <br />                                                                                   |
| `tr`  | `Throwable`: An exception to log. This value may be`null`. <br />                                                                                              |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### i

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int i (String tag, 
                String msg)
```

Send an[INFO](https://developer.android.com/reference/android/util/Log#INFO)log message.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value cannot be`null`. <br />                                                                                |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### isLoggable

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static boolean isLoggable (String tag, 
                int level)
```

Checks to see whether or not a log for the specified tag is loggable at the specified level. The default level of any tag is set to INFO. This means that any level above and including INFO will be logged. Before you make any calls to a logging method you should check to see if your tag should be logged. You can change the default level by setting a system property: 'setprop log.tag.\<YOUR_LOG_TAG\> \<LEVEL\>' Where level is either VERBOSE, DEBUG, INFO, WARN, ERROR, or ASSERT. You can also create a local.prop file that with the following in it: 'log.tag.\<YOUR_LOG_TAG\>=\<LEVEL\>' and place that in /data/local.prop.

<br />

|                                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                                ||
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag`   | `String`: The tag to check. This value may be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `level` | `int`: The level to check. Value is[ASSERT](https://developer.android.com/reference/android/util/Log#ASSERT),[ERROR](https://developer.android.com/reference/android/util/Log#ERROR),[WARN](https://developer.android.com/reference/android/util/Log#WARN),[INFO](https://developer.android.com/reference/android/util/Log#INFO),[DEBUG](https://developer.android.com/reference/android/util/Log#DEBUG), or[VERBOSE](https://developer.android.com/reference/android/util/Log#VERBOSE) <br /> |

|                               Returns                               ||
|-----------|----------------------------------------------------------|
| `boolean` | Whether or not that this is allowed to be logged. <br /> |

|                                                                                                                        Throws                                                                                                                        ||
|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | is thrown if the tag.length() \> 23 for Nougat (7.0) and prior releases (API \<= 25), there is no tag limit of concern after this API level. |

### println

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int println (int priority, 
                String tag, 
                String msg)
```

Low-level logging call.

<br />

|                                                                                                                                                                                                                                                          Parameters                                                                                                                                                                                                                                                          ||
|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `priority` | `int`: The priority/type of this log message Value is[ASSERT](https://developer.android.com/reference/android/util/Log#ASSERT),[ERROR](https://developer.android.com/reference/android/util/Log#ERROR),[WARN](https://developer.android.com/reference/android/util/Log#WARN),[INFO](https://developer.android.com/reference/android/util/Log#INFO),[DEBUG](https://developer.android.com/reference/android/util/Log#DEBUG), or[VERBOSE](https://developer.android.com/reference/android/util/Log#VERBOSE) <br /> |
| `tag`      | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br />                                                                                                                                                                                                                                                                                                                                                   |
| `msg`      | `String`: The message you would like logged. This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                  |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### v

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int v (String tag, 
                String msg)
```

Send a[VERBOSE](https://developer.android.com/reference/android/util/Log#VERBOSE)log message.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value cannot be`null`. <br />                                                                                |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### v

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int v (String tag, 
                String msg, 
                Throwable tr)
```

Send a[VERBOSE](https://developer.android.com/reference/android/util/Log#VERBOSE)log message and log the exception.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value may be`null`. <br />                                                                                   |
| `tr`  | `Throwable`: An exception to log. This value may be`null`. <br />                                                                                              |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### w

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int w (String tag, 
                Throwable tr)
```

Send a[WARN](https://developer.android.com/reference/android/util/Log#WARN)log message and log the exception.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `tr`  | `Throwable`: An exception to log. This value may be`null`. <br />                                                                                              |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### w

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int w (String tag, 
                String msg, 
                Throwable tr)
```

Send a[WARN](https://developer.android.com/reference/android/util/Log#WARN)log message and log the exception.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value may be`null`. <br />                                                                                   |
| `tr`  | `Throwable`: An exception to log. This value may be`null`. <br />                                                                                              |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### w

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int w (String tag, 
                String msg)
```

Send a[WARN](https://developer.android.com/reference/android/util/Log#WARN)log message.

<br />

|                                                                              Parameters                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value cannot be`null`. <br />                                                                                |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### wtf

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int wtf (String tag, 
                String msg)
```

What a Terrible Failure: Report a condition that should never happen. The error will always be logged at level ASSERT with the call stack. Depending on system configuration, a report may be added to the[DropBoxManager](https://developer.android.com/reference/android/os/DropBoxManager)and/or the process may be terminated immediately with an error dialog.

<br />

|                                           Parameters                                           ||
|-------|-----------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value may be`null`. <br />            |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### wtf

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int wtf (String tag, 
                Throwable tr)
```

What a Terrible Failure: Report an exception that should never happen. Similar to[wtf(java.lang.String, java.lang.String)](https://developer.android.com/reference/android/util/Log#wtf(java.lang.String,%20java.lang.String)), with an exception to log.

<br />

|                                           Parameters                                           ||
|-------|-----------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. This value may be`null`. <br /> |
| `tr`  | `Throwable`: An exception to log. This value cannot be`null`. <br />                    |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |

### wtf

Added in[API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static int wtf (String tag, 
                String msg, 
                Throwable tr)
```

What a Terrible Failure: Report an exception that should never happen. Similar to[wtf(java.lang.String, java.lang.Throwable)](https://developer.android.com/reference/android/util/Log#wtf(java.lang.String,%20java.lang.Throwable)), with a message as well.

<br />

|                                           Parameters                                           ||
|-------|-----------------------------------------------------------------------------------------|
| `tag` | `String`: Used to identify the source of a log message. This value may be`null`. <br /> |
| `msg` | `String`: The message you would like logged. This value may be`null`. <br />            |
| `tr`  | `Throwable`: An exception to log. May be null. <br />                                   |

|                                                                                         Returns                                                                                          ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A positive value if the message was loggable (see[isLoggable(String, int)](https://developer.android.com/reference/android/util/Log#isLoggable(java.lang.String,%20int))). <br /> |