Skip to content

Commit d30c9f2

Browse files
Global logger overload resolution ambiguity (#459)
* Update Logger.kt * Updating kermit API
1 parent 63b1c72 commit d30c9f2

3 files changed

Lines changed: 0 additions & 102 deletions

File tree

kermit/api/android/kermit.api

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,11 @@ public class co/touchlab/kermit/Logger : co/touchlab/kermit/BaseLogger {
5555
}
5656

5757
public final class co/touchlab/kermit/Logger$Companion : co/touchlab/kermit/Logger {
58-
public final fun a (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
59-
public static synthetic fun a$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
6058
public final fun addLogWriter ([Lco/touchlab/kermit/LogWriter;)V
61-
public final fun d (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
62-
public static synthetic fun d$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
63-
public final fun e (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
64-
public static synthetic fun e$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
6559
public fun getTag ()Ljava/lang/String;
66-
public final fun i (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
67-
public static synthetic fun i$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
6860
public final fun setLogWriters (Ljava/util/List;)V
6961
public final fun setLogWriters ([Lco/touchlab/kermit/LogWriter;)V
7062
public final fun setMinSeverity (Lco/touchlab/kermit/Severity;)V
7163
public final fun setTag (Ljava/lang/String;)V
72-
public final fun v (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
73-
public static synthetic fun v$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
74-
public final fun w (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
75-
public static synthetic fun w$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
7664
}
7765

kermit/api/jvm/kermit.api

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,11 @@ public class co/touchlab/kermit/Logger : co/touchlab/kermit/BaseLogger {
5555
}
5656

5757
public final class co/touchlab/kermit/Logger$Companion : co/touchlab/kermit/Logger {
58-
public final fun a (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
59-
public static synthetic fun a$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
6058
public final fun addLogWriter ([Lco/touchlab/kermit/LogWriter;)V
61-
public final fun d (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
62-
public static synthetic fun d$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
63-
public final fun e (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
64-
public static synthetic fun e$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
6559
public fun getTag ()Ljava/lang/String;
66-
public final fun i (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
67-
public static synthetic fun i$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
6860
public final fun setLogWriters (Ljava/util/List;)V
6961
public final fun setLogWriters ([Lco/touchlab/kermit/LogWriter;)V
7062
public final fun setMinSeverity (Lco/touchlab/kermit/Severity;)V
7163
public final fun setTag (Ljava/lang/String;)V
72-
public final fun v (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
73-
public static synthetic fun v$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
74-
public final fun w (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;)V
75-
public static synthetic fun w$default (Lco/touchlab/kermit/Logger$Companion;Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
7664
}
7765

kermit/src/commonMain/kotlin/co/touchlab/kermit/Logger.kt

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -225,84 +225,6 @@ open class Logger(config: LoggerConfig, open val tag: String = "") : BaseLogger(
225225
fun setTag(tag: String) {
226226
defaultTag = tag
227227
}
228-
229-
/**
230-
* Log a message with [Severity.Verbose] using the global logger.
231-
*
232-
* @param tag Tag to associate with the log message.
233-
* @param throwable Optional throwable to log.
234-
* @param message Lambda returning the message to log.
235-
*/
236-
fun v(tag: String, throwable: Throwable? = null, message: () -> String) {
237-
if (config.minSeverity <= Severity.Verbose) {
238-
log(Severity.Verbose, tag, throwable, message())
239-
}
240-
}
241-
242-
/**
243-
* Log a message with [Severity.Debug] using the global logger.
244-
*
245-
* @param tag Tag to associate with the log message.
246-
* @param throwable Optional throwable to log.
247-
* @param message Lambda returning the message to log.
248-
*/
249-
fun d(tag: String, throwable: Throwable? = null, message: () -> String) {
250-
if (config.minSeverity <= Severity.Debug) {
251-
log(Severity.Debug, tag, throwable, message())
252-
}
253-
}
254-
255-
/**
256-
* Log a message with [Severity.Info] using the global logger.
257-
*
258-
* @param tag Tag to associate with the log message.
259-
* @param throwable Optional throwable to log.
260-
* @param message Lambda returning the message to log.
261-
*/
262-
fun i(tag: String, throwable: Throwable? = null, message: () -> String) {
263-
if (config.minSeverity <= Severity.Info) {
264-
log(Severity.Info, tag, throwable, message())
265-
}
266-
}
267-
268-
/**
269-
* Log a message with [Severity.Warn] using the global logger.
270-
*
271-
* @param tag Tag to associate with the log message.
272-
* @param throwable Optional throwable to log.
273-
* @param message Lambda returning the message to log.
274-
*/
275-
fun w(tag: String, throwable: Throwable? = null, message: () -> String) {
276-
if (config.minSeverity <= Severity.Warn) {
277-
log(Severity.Warn, tag, throwable, message())
278-
}
279-
}
280-
281-
/**
282-
* Log a message with [Severity.Error] using the global logger.
283-
*
284-
* @param tag Tag to associate with the log message.
285-
* @param throwable Optional throwable to log.
286-
* @param message Lambda returning the message to log.
287-
*/
288-
fun e(tag: String, throwable: Throwable? = null, message: () -> String) {
289-
if (config.minSeverity <= Severity.Error) {
290-
log(Severity.Error, tag, throwable, message())
291-
}
292-
}
293-
294-
/**
295-
* Log a message with [Severity.Assert] using the global logger.
296-
*
297-
* @param tag Tag to associate with the log message.
298-
* @param throwable Optional throwable to log.
299-
* @param message Lambda returning the message to log.
300-
*/
301-
fun a(tag: String, throwable: Throwable? = null, message: () -> String) {
302-
if (config.minSeverity <= Severity.Assert) {
303-
log(Severity.Assert, tag, throwable, message())
304-
}
305-
}
306228
}
307229
}
308230

0 commit comments

Comments
 (0)