# MediaDrm.LogMessage

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

# LogMessage

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/media/MediaDrm.LogMessage "View this page in Java")  

```
class LogMessage
```

|---|------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                         ||
| ↳ | [android.media.MediaDrm.LogMessage](https://developer.android.com/reference/kotlin/android/media/MediaDrm.LogMessage#) |

A[LogMessage](https://developer.android.com/reference/kotlin/android/media/MediaDrm.LogMessage#)records an event in the[MediaDrm](https://developer.android.com/reference/kotlin/android/media/MediaDrm)framework or vendor plugin.

## Summary

|                                                                                                                                                      Public methods                                                                                                                                                       ||
|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getMessage](https://developer.android.com/reference/kotlin/android/media/MediaDrm.LogMessage#getMessage())`()` Description of the recorded event.                                                                                      |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [getPriority](https://developer.android.com/reference/kotlin/android/media/MediaDrm.LogMessage#getPriority())`()` Priority of the recorded event.                                                                                       |
| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)     | [getTimestampMillis](https://developer.android.com/reference/kotlin/android/media/MediaDrm.LogMessage#getTimestampMillis())`()` Timing of the recorded event measured in milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/android/media/MediaDrm.LogMessage#toString())`()` <br />                                                                                                                      |

## Public methods

### getMessage

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

```
fun getMessage(): String
```

Description of the recorded event.

|                                                    Return                                                     ||
|----------------------------------------------------------------------------------|-----------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be`null`. |

### getPriority

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

```
fun getPriority(): Int
```

Priority of the recorded event.

Possible priority constants are defined in[Log](https://developer.android.com/reference/kotlin/android/util/Log.html#), e.g.:

- [Log.ASSERT](https://developer.android.com/reference/kotlin/android/util/Log.html#ASSERT:kotlin.Int)
- [Log.ERROR](https://developer.android.com/reference/kotlin/android/util/Log.html#ERROR:kotlin.Int)
- [Log.WARN](https://developer.android.com/reference/kotlin/android/util/Log.html#WARN:kotlin.Int)
- [Log.INFO](https://developer.android.com/reference/kotlin/android/util/Log.html#INFO:kotlin.Int)
- [Log.DEBUG](https://developer.android.com/reference/kotlin/android/util/Log.html#DEBUG:kotlin.Int)
- [Log.VERBOSE](https://developer.android.com/reference/kotlin/android/util/Log.html#VERBOSE:kotlin.Int)

|                                                                                                                                                                                                                                                                                                                                                                                          Return                                                                                                                                                                                                                                                                                                                                                                                          ||
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is[android.util.Log#ASSERT](https://developer.android.com/reference/kotlin/android/util/Log.html#ASSERT:kotlin.Int),[android.util.Log#ERROR](https://developer.android.com/reference/kotlin/android/util/Log.html#ERROR:kotlin.Int),[android.util.Log#WARN](https://developer.android.com/reference/kotlin/android/util/Log.html#WARN:kotlin.Int),[android.util.Log#INFO](https://developer.android.com/reference/kotlin/android/util/Log.html#INFO:kotlin.Int),[android.util.Log#DEBUG](https://developer.android.com/reference/kotlin/android/util/Log.html#DEBUG:kotlin.Int), or[android.util.Log#VERBOSE](https://developer.android.com/reference/kotlin/android/util/Log.html#VERBOSE:kotlin.Int) |

### getTimestampMillis

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

```
fun getTimestampMillis(): Long
```

Timing of the recorded event measured in milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).  

### toString

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

```
fun toString(): String
```

|                                                          Return                                                          ||
|----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |