Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Mark logger functions internal
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt committed Apr 13, 2020
1 parent 09a653a commit 7c43481
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
14 changes: 0 additions & 14 deletions core/api/core.api
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
public final class com/juul/able/Able {
public static final field INSTANCE Lcom/juul/able/Able;
public final fun assert (Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun assert$default (Lcom/juul/able/Able;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public final fun debug (Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun debug$default (Lcom/juul/able/Able;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public final fun error (Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun error$default (Lcom/juul/able/Able;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public final fun getLogger ()Lcom/juul/able/logger/Logger;
public final fun info (Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun info$default (Lcom/juul/able/Able;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public final fun log (ILjava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun log$default (Lcom/juul/able/Able;ILjava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public final fun setLogger (Lcom/juul/able/logger/Logger;)V
public final fun verbose (Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun verbose$default (Lcom/juul/able/Able;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
public final fun warn (Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
public static synthetic fun warn$default (Lcom/juul/able/Able;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
}

public final class com/juul/able/BuildConfig {
Expand Down
14 changes: 7 additions & 7 deletions core/src/main/java/Able.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@ object Able {
@Volatile
var logger: Logger = AndroidLogger()

inline fun assert(throwable: Throwable? = null, message: () -> String) {
internal inline fun assert(throwable: Throwable? = null, message: () -> String) {
log(ASSERT, throwable, message)
}

inline fun error(throwable: Throwable? = null, message: () -> String) {
internal inline fun error(throwable: Throwable? = null, message: () -> String) {
log(ERROR, throwable, message)
}

inline fun warn(throwable: Throwable? = null, message: () -> String) {
internal inline fun warn(throwable: Throwable? = null, message: () -> String) {
log(WARN, throwable, message)
}

inline fun info(throwable: Throwable? = null, message: () -> String) {
internal inline fun info(throwable: Throwable? = null, message: () -> String) {
log(INFO, throwable, message)
}

inline fun debug(throwable: Throwable? = null, message: () -> String) {
internal inline fun debug(throwable: Throwable? = null, message: () -> String) {
log(DEBUG, throwable, message)
}

inline fun verbose(throwable: Throwable? = null, message: () -> String) {
internal inline fun verbose(throwable: Throwable? = null, message: () -> String) {
log(VERBOSE, throwable, message)
}

inline fun log(priority: Int, throwable: Throwable? = null, message: () -> String) {
internal inline fun log(priority: Int, throwable: Throwable? = null, message: () -> String) {
if (logger.isLoggable(priority)) {
logger.log(priority, throwable, message.invoke())
}
Expand Down

0 comments on commit 7c43481

Please sign in to comment.