@@ -8,10 +8,12 @@ import XCTest
88
99final class CLTLoggerTests : XCTestCase {
1010
11+ static let multilineMode : CLTLogger . MultilineMode = . default
12+
1113 override class func setUp( ) {
1214 /* ⚠️ Also change in the testBasicLogOutputWithAllEmojiSets method if changed here.
1315 * We have not created a variable because we would have to use the @Sendable annotation, which we cannot as we support Swift 5.2. */
14- LoggingSystem . bootstrap { _ in CLTLogger ( multilineMode: . allMultiline ) }
16+ LoggingSystem . bootstrap { _ in CLTLogger ( multilineMode: Self . multilineMode ) }
1517 }
1618
1719 /* From <https://apple.github.io/swift-log/docs/current/Logging/Protocols/LogHandler.html#treat-log-level-amp-metadata-as-values>. */
@@ -95,7 +97,7 @@ final class CLTLoggerTests : XCTestCase {
9597 XCTAssertTrue ( true , " We only want to see how the log look, so please see the logs. " )
9698
9799 for emojiSet in EmojiSet . allCases {
98- LoggingSystem . bootstrapInternal { _ in CLTLogger ( multilineMode: . allMultiline , constantsByLevel: CLTLogger . defaultConstantsByLogLevelForEmoji ( on: . standardError, forcedEmojiSet: emojiSet) ) }
100+ LoggingSystem . bootstrapInternal { _ in CLTLogger ( multilineMode: Self . multilineMode , constantsByLevel: CLTLogger . defaultConstantsByLogLevelForEmoji ( on: . standardError, forcedEmojiSet: emojiSet) ) }
99101 try FileHandle . standardError. write ( contentsOf: Data ( " \n ***** \( emojiSet. rawValue) ***** \n " . utf8) )
100102 var logger = Logger ( label: " my logger " )
101103 logger. logLevel = . trace
@@ -109,7 +111,7 @@ final class CLTLoggerTests : XCTestCase {
109111 }
110112 /* Reset factory.
111113 * ⚠️ Also change in the setUp method if changed here. */
112- LoggingSystem . bootstrapInternal { _ in CLTLogger ( multilineMode: . allMultiline ) }
114+ LoggingSystem . bootstrapInternal { _ in CLTLogger ( multilineMode: Self . multilineMode ) }
113115 }
114116
115117}
0 commit comments