Skip to content

Commit ae4e667

Browse files
committed
Disable logging by default
1 parent ade997a commit ae4e667

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Example/InterposeExample/AppDelegate.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import InterposeKit
1212
class AppDelegate: UIResponder, UIApplicationDelegate {
1313

1414
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
15+
16+
Interpose.isLoggingEnabled = true
17+
1518
fixMacCatalystInputSystemSessionRace()
1619
return true
1720
}

Sources/InterposeKit/InterposeKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ extension Interpose {
199199

200200
extension Interpose {
201201
/// Logging uses print and is minimal.
202-
public static var isLoggingEnabled = true
202+
public static var isLoggingEnabled = false
203203

204204
/// Simple log wrapper for print.
205205
fileprivate class func log(_ object: Any) {

Tests/InterposeKitTests/InterposeKitTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class TestSubclass: TestClass {
2222

2323
final class InterposeKitTests: XCTestCase {
2424

25+
override func setUpWithError() throws {
26+
Interpose.isLoggingEnabled = true
27+
}
28+
2529
func testClassOverrideAndRevert() throws {
2630
let testObj = TestClass()
2731
XCTAssertEqual(testObj.sayHi(), testClassHi)

0 commit comments

Comments
 (0)