From 88f89de75376ef1ead235a3561dc783605b627a0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 02:00:52 +0000 Subject: [PATCH 1/3] Initial plan From d90b3ebb51b1591ec446ea16837ff378fa016131 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 02:04:33 +0000 Subject: [PATCH 2/3] feat: add iOS Logger implementation and comprehensive KDoc documentation Co-authored-by: SmilingPixel <73827509+SmilingPixel@users.noreply.github.com> --- .../io/github/smiling_pixel/util/Logger.kt | 66 ++++++++++++++++++- .../github/smiling_pixel/util/Logger.ios.kt | 10 +++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt diff --git a/composeApp/src/commonMain/kotlin/io/github/smiling_pixel/util/Logger.kt b/composeApp/src/commonMain/kotlin/io/github/smiling_pixel/util/Logger.kt index ccaa947..6c2a0de 100644 --- a/composeApp/src/commonMain/kotlin/io/github/smiling_pixel/util/Logger.kt +++ b/composeApp/src/commonMain/kotlin/io/github/smiling_pixel/util/Logger.kt @@ -1,14 +1,78 @@ package io.github.smiling_pixel.util +/** + * Represents the severity of a log message. + * + * Loggers can use this level to filter or format output depending on + * how important or noisy a given message is. + */ enum class LogLevel { - DEBUG, INFO, WARN, ERROR + /** + * Fine-grained diagnostic information that is useful during development + * and troubleshooting, but typically too verbose for production logs. + */ + DEBUG, + + /** + * General informational messages that describe the normal flow of the + * application, such as lifecycle events or high-level state changes. + */ + INFO, + + /** + * Potential problems or unusual situations that are not necessarily + * errors but might require attention or investigation. + */ + WARN, + + /** + * Error conditions indicating that an operation has failed or that the + * application is in an unexpected state and may not be able to continue + * normally. + */ + ERROR } expect object Logger { fun log(level: LogLevel, tag: String, message: String) } +/** + * Logs a debug-level message using this [Logger]. + * + * Shorthand for calling [log] with [LogLevel.DEBUG]. + * + * @param tag A short tag identifying the log source. + * @param message The message to be logged. + */ fun Logger.d(tag: String, message: String) = log(LogLevel.DEBUG, tag, message) + +/** + * Logs an info-level message using this [Logger]. + * + * Shorthand for calling [log] with [LogLevel.INFO]. + * + * @param tag A short tag identifying the log source. + * @param message The message to be logged. + */ fun Logger.i(tag: String, message: String) = log(LogLevel.INFO, tag, message) + +/** + * Logs a warning-level message using this [Logger]. + * + * Shorthand for calling [log] with [LogLevel.WARN]. + * + * @param tag A short tag identifying the log source. + * @param message The message to be logged. + */ fun Logger.w(tag: String, message: String) = log(LogLevel.WARN, tag, message) + +/** + * Logs an error-level message using this [Logger]. + * + * Shorthand for calling [log] with [LogLevel.ERROR]. + * + * @param tag A short tag identifying the log source. + * @param message The message to be logged. + */ fun Logger.e(tag: String, message: String) = log(LogLevel.ERROR, tag, message) diff --git a/composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt b/composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt new file mode 100644 index 0000000..973f3c0 --- /dev/null +++ b/composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt @@ -0,0 +1,10 @@ +package io.github.smiling_pixel.util + +import platform.Foundation.NSLog + +actual object Logger { + actual fun log(level: LogLevel, tag: String, message: String) { + // NSLog automatically adds timestamp and process info + NSLog("[$level] $tag: $message") + } +} From 3057994ebbf8abacfbeeb2fb21a4fcdbf5d1a40c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 02:31:20 +0000 Subject: [PATCH 3/3] Remove iOS Logger implementation per maintainer request Co-authored-by: SmilingPixel <73827509+SmilingPixel@users.noreply.github.com> --- .../kotlin/io/github/smiling_pixel/util/Logger.ios.kt | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt diff --git a/composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt b/composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt deleted file mode 100644 index 973f3c0..0000000 --- a/composeApp/src/iosMain/kotlin/io/github/smiling_pixel/util/Logger.ios.kt +++ /dev/null @@ -1,10 +0,0 @@ -package io.github.smiling_pixel.util - -import platform.Foundation.NSLog - -actual object Logger { - actual fun log(level: LogLevel, tag: String, message: String) { - // NSLog automatically adds timestamp and process info - NSLog("[$level] $tag: $message") - } -}