Skip to content

Commit

Permalink
fix(sdk): reduce logging from release build (#122)
Browse files Browse the repository at this point in the history
* fix(sdk): cut logging from release build

* docs(sdk): add maintainer's note about release tag

* Update MAINTAINERS.md

---------

Co-authored-by: e271828- <[email protected]>
  • Loading branch information
CAMOBAP and e271828- authored Jul 22, 2023
1 parent b3df4ea commit cbd2dfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HCaptcha/Classes/HCaptchaLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ internal class HCaptchaLogger {
}

static func log(level: HCaptchaLogLevel, message: String, args: [CVarArg]) {
#if DEBUG
guard level.rawValue >= minLevel.rawValue else {
return
}
Expand All @@ -52,6 +53,7 @@ internal class HCaptchaLogger {
let logMessage = "\(timestamp) HCaptcha/\(level.description): \(formattedMessage)"

print(logMessage)
#endif
}

private static var timestamp: String {
Expand Down
4 changes: 4 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ After merging and tests pass:
### Where is the logic for releasing packages for `Carthage` or `Swift Package Manager`?

Unlike `Cocoapods`, `Carthage` and `SPM` are decentralized. They do not require any centralized updates per version.

### How is a release triggered?

We use GitOps. It is triggered by a version tag on the default branch (`master`). This must be done by an administrator, as we use tag protection. Don't tag the new version on feature branches, just update the metadata for release.

0 comments on commit cbd2dfc

Please sign in to comment.