All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
main.com.sceyt.chatuikit.logger.SceytLog.kt Maven / Gradle / Ivy
package com.sceyt.chatuikit.logger
object SceytLog {
private var logLevel = SceytLogLevel.Verbose
private var logger: SceytLogger = SceytLoggerImpl()
internal fun setLogger(logLevel: SceytLogLevel, logger: SceytLogger) {
this.logLevel = logLevel
this.logger = logger
}
fun e(tag: String, message: String?, throwable: Throwable? = null) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Error))
logger.log(Priority.Error, tag, message, throwable)
}
fun e(tag: String, message: String?) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Error))
logger.log(Priority.Error, tag, message, null)
}
fun w(tag: String, message: String?, throwable: Throwable? = null) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Warning))
logger.log(Priority.Warning, tag, message, throwable)
}
fun w(tag: String, message: String?) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Warning))
logger.log(Priority.Warning, tag, message, null)
}
fun d(tag: String, message: String?, throwable: Throwable? = null) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Debug))
logger.log(Priority.Debug, tag, message, throwable)
}
fun d(tag: String, message: String?) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Debug))
logger.log(Priority.Debug, tag, message, null)
}
fun i(tag: String, message: String?, throwable: Throwable? = null) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Info))
logger.log(Priority.Info, tag, message, throwable)
}
fun i(tag: String, message: String?) {
if (SceytLogLevelValidator(logLevel).isLoggable(Priority.Info))
logger.log(Priority.Info, tag, message, null)
}
}