Skip to content

Commit 9c38c49

Browse files
authored
fix deprecated "replaceWith" directive (#340)
1 parent bbd5708 commit 9c38c49

File tree

1 file changed

+12
-10
lines changed
  • src/commonMain/kotlin/io/github/oshai/kotlinlogging

1 file changed

+12
-10
lines changed

src/commonMain/kotlin/io/github/oshai/kotlinlogging/KLogger.kt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -253,27 +253,27 @@ public interface KLogger {
253253
@Deprecated("use error instead", ReplaceWith("error(t, marker, msg)"))
254254
public fun error(marker: Marker?, t: Throwable?, msg: () -> Any?): Unit = error(t, marker, msg)
255255

256-
@Deprecated("Use isTraceEnabled instead", ReplaceWith("isTraceEnabled"))
256+
@Deprecated("Use isTraceEnabled() instead", ReplaceWith("isTraceEnabled()"))
257257
public val isTraceEnabled: Boolean
258258
get() = isTraceEnabled()
259259

260-
@Deprecated("Use isDebugEnabled instead", ReplaceWith("isDebugEnabled"))
260+
@Deprecated("Use isDebugEnabled() instead", ReplaceWith("isDebugEnabled()"))
261261
public val isDebugEnabled: Boolean
262262
get() = isDebugEnabled()
263263

264-
@Deprecated("Use isInfoEnabled instead", ReplaceWith("isInfoEnabled"))
264+
@Deprecated("Use isInfoEnabled() instead", ReplaceWith("isInfoEnabled()"))
265265
public val isInfoEnabled: Boolean
266266
get() = isInfoEnabled()
267267

268-
@Deprecated("Use isWarnEnabled instead", ReplaceWith("isWarnEnabled"))
268+
@Deprecated("Use isWarnEnabled() instead", ReplaceWith("isWarnEnabled()"))
269269
public val isWarnEnabled: Boolean
270270
get() = isWarnEnabled()
271271

272-
@Deprecated("Use isErrorEnabled instead", ReplaceWith("isErrorEnabled"))
272+
@Deprecated("Use isErrorEnabled() instead", ReplaceWith("isErrorEnabled()"))
273273
public val isErrorEnabled: Boolean
274274
get() = isErrorEnabled()
275275

276-
@Deprecated("Use isLoggingOff instead", ReplaceWith("isLoggingOff"))
276+
@Deprecated("Use isLoggingOff() instead", ReplaceWith("isLoggingOff()"))
277277
public val isLoggingOff: Boolean
278278
get() = isLoggingOff()
279279

@@ -398,7 +398,7 @@ public interface KLogger {
398398
*
399399
* @param msg the message string to be logged
400400
*/
401-
@Deprecated("Use debug {} instead", replaceWith = ReplaceWith("debug { \"\$msg\"}"))
401+
@Deprecated("Use debug {} instead", replaceWith = ReplaceWith("debug { msg }"))
402402
public fun debug(msg: String?): Unit = debug { msg }
403403

404404
/**
@@ -514,7 +514,8 @@ public interface KLogger {
514514
*
515515
* @param msg the message string to be logged
516516
*/
517-
@Deprecated("Use info {} instead") public fun info(msg: String?): Unit = info { msg }
517+
@Deprecated("Use info {} instead", ReplaceWith("info { msg }"))
518+
public fun info(msg: String?): Unit = info { msg }
518519

519520
/**
520521
* Log a message at the INFO level according to the specified msg and argument.
@@ -628,7 +629,8 @@ public interface KLogger {
628629
*
629630
* @param msg the message string to be logged
630631
*/
631-
@Deprecated("Use warn {} instead") public fun warn(msg: String?): Unit = warn { msg }
632+
@Deprecated("Use warn {} instead", ReplaceWith("warn { msg }"))
633+
public fun warn(msg: String?): Unit = warn { msg }
632634

633635
/**
634636
* Log a message at the WARN level according to the specified msg and argument.
@@ -742,7 +744,7 @@ public interface KLogger {
742744
*
743745
* @param msg the message string to be logged
744746
*/
745-
@Deprecated("Use error {} instead", replaceWith = ReplaceWith("error { \"\$msg\"}"))
747+
@Deprecated("Use error {} instead", replaceWith = ReplaceWith("error { msg }"))
746748
public fun error(msg: String?): Unit = error { msg }
747749

748750
/**

0 commit comments

Comments
 (0)