Logger

abstract class Logger @JvmOverloads constructor(methodOffset: Int = 0) : ILogger

日志记录器基类;封装好一些通用的逻辑,从而简化其子类的实现。

Author

Jenly

Follow me

Parameters

methodOffset

Hides internal method calls up to offset.

Inheritors

Constructors

Link copied to clipboard
constructor(methodOffset: Int = 0)

Functions

Link copied to clipboard
open override fun d(t: Throwable?)

Log a debug exception.

open override fun d(message: String?, vararg args: Any?)

Log a debug message with optional format args.

open override fun d(t: Throwable?, message: String?, vararg args: Any?)

Log a debug exception and a message with optional format args.

Link copied to clipboard
open override fun e(t: Throwable?)

Log an error exception.

open override fun e(message: String?, vararg args: Any?)

Log an error message with optional format args.

open override fun e(t: Throwable?, message: String?, vararg args: Any?)

Log an error exception and a message with optional format args.

Link copied to clipboard
open override fun i(t: Throwable?)

Log an info exception.

open override fun i(message: String?, vararg args: Any?)

Log an info message with optional format args.

open override fun i(t: Throwable?, message: String?, vararg args: Any?)

Log an info exception and a message with optional format args.

Link copied to clipboard
open override fun log(priority: Int, message: String?)

Log at priority an message.

open override fun log(priority: Int, t: Throwable?)

Log at priority an exception.

open override fun log(priority: Int, t: Throwable?, message: String?)

Log at priority an exception and a message.

abstract fun log(priority: Int, tag: String?, message: String?, t: Throwable?)

Write a log message to its destination. Called for all level-specific methods by default.

Link copied to clipboard
open override fun offset(methodOffset: Int): ILogger

Set a one-time method trace offset for use on the next logging call.

Link copied to clipboard
open override fun tag(tag: String): ILogger

Set a one-time tag for use on the next logging call.

Link copied to clipboard
open override fun v(t: Throwable?)

Log a verbose exception.

open override fun v(message: String?, vararg args: Any?)

Log a verbose message with optional format args.

open override fun v(t: Throwable?, message: String?, vararg args: Any?)

Log a verbose exception and a message with optional format args.

Link copied to clipboard
open override fun w(t: Throwable?)

Log a warning exception.

open override fun w(message: String?, vararg args: Any?)

Log a warning message with optional format args.

open override fun w(t: Throwable?, message: String?, vararg args: Any?)

Log a warning exception and a message with optional format args.

Link copied to clipboard
open override fun wtf(t: Throwable?)

Log an assert exception.

open override fun wtf(message: String?, vararg args: Any?)

Log an assert message with optional format args.

open override fun wtf(t: Throwable?, message: String?, vararg args: Any?)

Log an assert exception and a message with optional format args.