-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from ably-labs/48-transient-disconnect-timeouts
[ECO-4983] Implement the "transient disconnect timeouts" parts of room lifecycle spec
- Loading branch information
Showing
8 changed files
with
482 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
@testable import AblyChat | ||
|
||
struct TestLogger: InternalLogger { | ||
func log(message _: String, level _: LogLevel, codeLocation _: CodeLocation) { | ||
// No-op; currently we don’t log in tests to keep the test logs easy to read. Can reconsider if necessary. | ||
// By default, we don’t log in tests to keep the test logs easy to read. You can set this property to `true` to temporarily turn logging on if you want to debug a test. | ||
static let loggingEnabled = false | ||
|
||
private let underlyingLogger = DefaultInternalLogger(logHandler: nil, logLevel: .trace) | ||
|
||
func log(message: String, level: LogLevel, codeLocation: CodeLocation) { | ||
guard Self.loggingEnabled else { | ||
return | ||
} | ||
|
||
underlyingLogger.log(message: message, level: level, codeLocation: codeLocation) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.