Skip to content

Commit 3f70bba

Browse files
committed
Debug logs only in debug environment
1 parent 01c08ef commit 3f70bba

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sources/OpenAI/Logger/PlatformLogger.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ package struct PlatformLogger {
2727
}
2828

2929
package func debug(_ message: String) {
30+
#if DEBUG
3031
#if canImport(os)
3132
os_log(.debug, log: log, "%@", message)
3233
#else
3334
logger.debug("\(message)")
3435
#endif
36+
#endif
3537
}
3638
}

0 commit comments

Comments
 (0)