Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecated "replaceMe" directive #340

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/commonMain/kotlin/io/github/oshai/kotlinlogging/KLogger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -253,27 +253,27 @@ public interface KLogger {
@Deprecated("use error instead", ReplaceWith("error(t, marker, msg)"))
public fun error(marker: Marker?, t: Throwable?, msg: () -> Any?): Unit = error(t, marker, msg)

@Deprecated("Use isTraceEnabled instead", ReplaceWith("isTraceEnabled"))
@Deprecated("Use isTraceEnabled() instead", ReplaceWith("isTraceEnabled()"))
public val isTraceEnabled: Boolean
get() = isTraceEnabled()

@Deprecated("Use isDebugEnabled instead", ReplaceWith("isDebugEnabled"))
@Deprecated("Use isDebugEnabled() instead", ReplaceWith("isDebugEnabled()"))
public val isDebugEnabled: Boolean
get() = isDebugEnabled()

@Deprecated("Use isInfoEnabled instead", ReplaceWith("isInfoEnabled"))
@Deprecated("Use isInfoEnabled() instead", ReplaceWith("isInfoEnabled()"))
public val isInfoEnabled: Boolean
get() = isInfoEnabled()

@Deprecated("Use isWarnEnabled instead", ReplaceWith("isWarnEnabled"))
@Deprecated("Use isWarnEnabled() instead", ReplaceWith("isWarnEnabled()"))
public val isWarnEnabled: Boolean
get() = isWarnEnabled()

@Deprecated("Use isErrorEnabled instead", ReplaceWith("isErrorEnabled"))
@Deprecated("Use isErrorEnabled() instead", ReplaceWith("isErrorEnabled()"))
public val isErrorEnabled: Boolean
get() = isErrorEnabled()

@Deprecated("Use isLoggingOff instead", ReplaceWith("isLoggingOff"))
@Deprecated("Use isLoggingOff() instead", ReplaceWith("isLoggingOff()"))
public val isLoggingOff: Boolean
get() = isLoggingOff()

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

/**
Expand Down Expand Up @@ -514,7 +514,8 @@ public interface KLogger {
*
* @param msg the message string to be logged
*/
@Deprecated("Use info {} instead") public fun info(msg: String?): Unit = info { msg }
@Deprecated("Use info {} instead", ReplaceWith("info { msg }"))
public fun info(msg: String?): Unit = info { msg }

/**
* Log a message at the INFO level according to the specified msg and argument.
Expand Down Expand Up @@ -628,7 +629,8 @@ public interface KLogger {
*
* @param msg the message string to be logged
*/
@Deprecated("Use warn {} instead") public fun warn(msg: String?): Unit = warn { msg }
@Deprecated("Use warn {} instead", ReplaceWith("warn { msg }"))
public fun warn(msg: String?): Unit = warn { msg }

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

/**
Expand Down
Loading