-
public class Log.Companion
-
-
Method Summary
Modifier and Type Method Description final Unitv(String tag, String msg)Send a . final Unitv(String tag, String msg, Throwable tr)Send a . final Unitd(String tag, String msg)Send a . final Unitd(String tag, String msg, Throwable tr)Send a . final Uniti(String tag, String msg)Send an . final Uniti(String tag, String msg, Throwable tr)Send a . final Unitw(String tag, String msg)Send a . final Unitw(String tag, String msg, Throwable tr)Send a . final Unitw(String tag, Throwable tr)Send a . final Unite(String tag, String msg)Send an . final Unite(String tag, String msg, Throwable tr)Send a . final StringgetStackTraceString(Throwable tr)Handy function to get a loggable stack trace from a Throwable final Integerprintln(Integer priority, String tag, String msg)Low-level logging call. final Logget(String tag)The only way to receive log object.<br></br> This method is thread safe.<br></br> In case of calling this method from the thread which is already has active(not released) Log object then that object returned with changed tag, previous pushed data will be automatically flushed. final Unitinvoke(String tag, CharSequence separator, Boolean autoNewLine, Integer logLevel, Function1<Log.LogBuilder, Unit> block)final IntegergetVERBOSE()Priority constant for the println method; use Log.v. final IntegergetDEBUG()Priority constant for the println method; use Log.d. final IntegergetINFO()Priority constant for the println method; use Log.i. final IntegergetWARN()Priority constant for the println method; use Log.w. final IntegergetERROR()Priority constant for the println method; use Log.e. final IntegergetASSERT()Priority constant for the println method. -
-
Method Detail
-
v
final Unit v(String tag, String msg)
Send a .VERBOSE log message.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.
-
v
final Unit v(String tag, String msg, Throwable tr)
Send a .VERBOSE log message and log the exception.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.tr- An exception to log
-
d
final Unit d(String tag, String msg)
Send a .DEBUG log message.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.
-
d
final Unit d(String tag, String msg, Throwable tr)
Send a .DEBUG log message and log the exception.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.tr- An exception to log
-
i
final Unit i(String tag, String msg)
Send an .INFO log message.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.
-
i
final Unit i(String tag, String msg, Throwable tr)
Send a .INFO log message and log the exception.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.tr- An exception to log
-
w
final Unit w(String tag, String msg)
Send a .WARN log message.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.
-
w
final Unit w(String tag, String msg, Throwable tr)
Send a .WARN log message and log the exception.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.tr- An exception to log
-
w
final Unit w(String tag, Throwable tr)
Send a .WARN log message and log the exception.
- Parameters:
tag- Used to identify the source of a log message.tr- An exception to log
-
e
final Unit e(String tag, String msg)
Send an .ERROR log message.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.
-
e
final Unit e(String tag, String msg, Throwable tr)
Send a .ERROR log message and log the exception.
- Parameters:
tag- Used to identify the source of a log message.msg- The message you would like logged.tr- An exception to log
-
getStackTraceString
final String getStackTraceString(Throwable tr)
Handy function to get a loggable stack trace from a Throwable
- Parameters:
tr- An exception to log
-
println
final Integer println(Integer priority, String tag, String msg)
Low-level logging call.
- Parameters:
priority- The priority/type of this log messagetag- Used to identify the source of a log message.msg- The message you would like logged.
-
get
final Log get(String tag)
The only way to receive log object.<br></br> This method is thread safe.<br></br> In case of calling this method from the thread which is already has active(not released) Log object then that object returned with changed tag, previous pushed data will be automatically flushed.
- Parameters:
tag- tag for log object
-
invoke
final Unit invoke(String tag, CharSequence separator, Boolean autoNewLine, Integer logLevel, Function1<Log.LogBuilder, Unit> block)
-
getVERBOSE
final Integer getVERBOSE()
Priority constant for the println method; use Log.v.
-
-
-
-