File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -85,18 +85,22 @@ public enum Interpose {
8585 // MARK: Logging
8686 // ============================================================================ //
8787
88- /// The flag indicating whether logging is enabled.
89- public static var isLoggingEnabled = false
88+ /// The flag that enables logging of InterposeKit internal operations to standard output
89+ /// using the `print(…)` function. Defaults to `false`.
90+ ///
91+ /// It is recommended to set this flag only once early in your application lifecycle,
92+ /// e.g. at app startup or in test setup.
93+ public nonisolated ( unsafe) static var isLoggingEnabled = false
9094
91- internal static func log(
95+ internal nonisolated static func log(
9296 _ message: @autoclosure ( ) -> String
9397 ) {
9498 if self . isLoggingEnabled {
9599 print ( " [InterposeKit] \( message ( ) ) " )
96100 }
97101 }
98102
99- internal static func fail(
103+ internal nonisolated static func fail(
100104 _ message: @autoclosure ( ) -> String
101105 ) -> Never {
102106 fatalError ( " [InterposeKit] \( message ( ) ) " )
You can’t perform that action at this time.
0 commit comments