Stay organized with collections
Save and categorize content based on your preferences.
LogPrinter
open class LogPrinter : Printer
Implementation of a android.util.Printer
that sends its output to the system log.
Summary
Public constructors |
Create a new Printer that sends to the log with the given priority and tag.
|
Public constructors
LogPrinter
LogPrinter(
priority: Int,
tag: String!)
Create a new Printer that sends to the log with the given priority and tag.
Public methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# LogPrinter\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nLogPrinter\n==========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/util/LogPrinter \"View this page in Java\") \n\n```\nopen class LogPrinter : Printer\n```\n\n|---|------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.util.LogPrinter](#) |\n\nImplementation of a [android.util.Printer](/reference/kotlin/android/util/Printer) that sends its output to the system log.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [LogPrinter](#LogPrinter(kotlin.Int,%20kotlin.String))`(`priority:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `tag:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Create a new Printer that sends to the log with the given priority and tag. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [println](#println(kotlin.String))`(`x:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### LogPrinter\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nLogPrinter(\n priority: Int, \n tag: String!)\n```\n\nCreate a new Printer that sends to the log with the given priority and tag.\n\n| Parameters ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `priority` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The desired log priority: [Log.VERBOSE](/reference/kotlin/android/util/Log#VERBOSE:kotlin.Int), [Log.DEBUG](/reference/kotlin/android/util/Log#DEBUG:kotlin.Int), [Log.INFO](/reference/kotlin/android/util/Log#INFO:kotlin.Int), [Log.WARN](/reference/kotlin/android/util/Log#WARN:kotlin.Int), or [Log.ERROR](/reference/kotlin/android/util/Log#ERROR:kotlin.Int). |\n| `tag` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: A string tag to associate with each printed log statement. |\n\nPublic methods\n--------------\n\n### println\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun println(x: String!): Unit\n```"]]