Package-level declarations

Types

Link copied to clipboard
class AndroidLogcatLogger(minPriority: LogPriority = LogPriority.DEBUG) : LogcatLogger

A logcat logger that delegates to android.util.Log for any log with a priority of at least minPriorityInt, and is otherwise a no-op.

Link copied to clipboard
interface LogcatLogger
Link copied to clipboard

An enum for log priorities that map to android.util.Log priority constants without a direct import.

Link copied to clipboard

A LogcatLogger that always logs and delegates to println concatenating the tag and message, separated by a space. Alternative to AndroidLogcatLogger when running on a JVM.

Functions

Link copied to clipboard

Utility to turn a Throwable into a loggable string.

Link copied to clipboard
inline fun logcat(tag: String, priority: LogPriority = DEBUG, message: () -> String)

An overload for logging that does not capture the calling code as tag. This should only be used in standalone functions where there is no this.

Link copied to clipboard
inline fun Any.logcat(priority: LogPriority = DEBUG, tag: String? = null, message: () -> String)

A tiny Kotlin API for cheap logging on top of Android's normal Log class.