Dbg

object Dbg

Provides utility methods for debug logging.

Since

1.0.0-pre

Properties

Link copied to clipboard
const val TAG: String

Tag used by logcat

Functions

Link copied to clipboard
fun error(format: Any, vararg args: Any?)
fun error(obj: Class<*>, format: Any, vararg args: Any?)
fun error(stck: StackTraceElement, format: Any, vararg args: Any?)

Log an error message. Messages will be prepended with the ERROR_PREPEND string Best used in a scenario where the program cannot continue normally or at required functionality

Link copied to clipboard
fun log(format: Any, vararg args: Any?)
fun log(obj: Class<*>, format: Any, vararg args: Any?)
fun log(stck: StackTraceElement, format: Any, vararg args: Any?)

Log a user message. Best used to log a message or value to Logcat from user code

Link copied to clipboard
fun logd(format: Any, vararg args: Any?)
fun logd(obj: Class<*>, format: Any, vararg args: Any?)
fun logd(stck: StackTraceElement, format: Any, vararg args: Any?)

Log an internal debug message. Best used from critical classes to log internal state

Link copied to clipboard
fun logTmp(format: Any, vararg args: Any?)
fun logTmp(obj: Class<*>, format: Any, vararg args: Any?)
fun logTmp(stck: StackTraceElement, format: Any, vararg args: Any?)

Log a user message temporarily. This method is marked as 'deprecated' to remind you to remove it before committing your code and for it to be picked up as part of static code analysis. It serves the same as a regular log() call.

Link copied to clipboard
fun logv(format: Any, vararg args: Any?)
fun logv(obj: Class<*>, format: Any, vararg args: Any?)
fun logv(stck: StackTraceElement, format: Any, vararg args: Any?)

Log a verbose message. Used from always-messages that can be omitted, such as the firing notifications of methods

Link copied to clipboard

Report out a stacktrace.

Link copied to clipboard

Log a timestamp from inside a BunyipsOpMode. This will call a log() with the current time since the last timer reset, prefixed with the last user-related function that was called. If not called from a BunyipsOpMode, time information will be unknown.

Link copied to clipboard
fun warn(format: Any, vararg args: Any?)
fun warn(obj: Class<*>, format: Any, vararg args: Any?)
fun warn(stck: StackTraceElement, format: Any, vararg args: Any?)

Log a warning message. Messages will be prepended with the WRN_PREPEND string Best used in a scenario where the program can continue, but the user should be warned